@ox0/ui 3.11.0 → 3.13.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/button.d.ts +3 -2
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/layer-stack.d.ts +3 -0
- package/dist/components/layer-stack.d.ts.map +1 -0
- package/dist/components/toast.d.ts +5 -0
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/tooltip.d.ts +8 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/index.js +94 -38
- package/package.json +3 -3
|
@@ -13,10 +13,11 @@ export interface ButtonProps extends PropsWithChildren, Omit<ButtonHTMLAttribute
|
|
|
13
13
|
/**
|
|
14
14
|
* Visual emphasis. Use `primary` for the single dominant action per view.
|
|
15
15
|
* Use `danger` / `danger-secondary` for destructive confirmation actions.
|
|
16
|
-
* Use `inline` for low-prominence text actions; `hinted` for the same with a dotted underline
|
|
16
|
+
* Use `inline` for low-prominence text actions; `hinted` for the same with a dotted underline;
|
|
17
|
+
* `danger-inline` for a destructive one beside them.
|
|
17
18
|
* @default "secondary"
|
|
18
19
|
*/
|
|
19
|
-
readonly variant?: "primary" | "secondary" | "ghost" | "flat" | "circle" | "danger" | "danger-secondary" | "inline" | "hinted";
|
|
20
|
+
readonly variant?: "primary" | "secondary" | "ghost" | "flat" | "circle" | "danger" | "danger-secondary" | "inline" | "danger-inline" | "hinted";
|
|
20
21
|
/** Spatial size. @default "md" */
|
|
21
22
|
readonly size?: "xs" | "sm" | "md" | "lg";
|
|
22
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EACL,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAA;AAId;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAsCzF,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B,MAAM,WAAW,WACf,SACE,iBAAiB,EACjB,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACrC,UAAU,GACV,WAAW,GACX,SAAS,GACT,WAAW,GACX,SAAS,GACT,eAAe,GACf,eAAe,GACf,aAAa,GACb,iBAAiB,CACpB;IACH
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EACL,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAA;AAId;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAsCzF,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B,MAAM,WAAW,WACf,SACE,iBAAiB,EACjB,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACrC,UAAU,GACV,WAAW,GACX,SAAS,GACT,WAAW,GACX,SAAS,GACT,eAAe,GACf,eAAe,GACf,aAAa,GACb,iBAAiB,CACpB;IACH;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAA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|
10
|
+
* Shows the "some" state (a dash) — e.g. a select-all box when only some rows are selected.
|
|
11
|
+
* Assistive technology reads it as "mixed". Clicking still reports `isSelected`.
|
|
12
|
+
*/
|
|
13
|
+
readonly isIndeterminate?: boolean;
|
|
9
14
|
readonly defaultSelected?: boolean;
|
|
10
15
|
readonly errorMessage?: ReactNode;
|
|
11
16
|
readonly onChange?: (isSelected: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,KAAK,eAAe,EAAuC,MAAM,uBAAuB,CAAA;AAKjG,MAAM,WAAW,aACf,SACE,IAAI,CACF,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,gBAAgB,GAAG,MAAM,eAAe,CACxF,EACD,eAAe;IACjB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAA;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAA;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAA;CAClD;AAED,eAAO,MAAM,QAAQ,4GAkEnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAKd,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAQjD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE9C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAA;IACjC,wBAAwB;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAA;IAChC,uFAAuF;IACvF,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAA;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,SAAiB,EACjB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAgB,GACjB,EAAE,kBAAkB,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QAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAO9D;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B;AAED,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,SAAS,CAE5D;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B;AAED,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAEhE;AAID,eAAO,MAAM,MAAM;;;;;;CAMjB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AA+Bd,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA;AAC9C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,CAAA;AAE9C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAA;IACpC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAA;IAChC;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IACpC,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,OAA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
|
|
|
1
|
+
{"version":3,"file":"layer-stack.d.ts","sourceRoot":"","sources":["../../src/components/layer-stack.ts"],"names":[],"mappings":"AASA,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,OAAO,CAYvD"}
|
|
@@ -20,6 +20,11 @@ interface ToastContextValue {
|
|
|
20
20
|
}
|
|
21
21
|
/** Call from anywhere inside ToastProvider to show a toast. */
|
|
22
22
|
export declare function useToast(): ToastContextValue;
|
|
23
|
+
/**
|
|
24
|
+
* Like `useToast`, but null outside a ToastProvider — for components that offer a toast (an Undo)
|
|
25
|
+
* when the app has one and work without it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useOptionalToast(): ToastContextValue | null;
|
|
23
28
|
interface ToastProviderProps {
|
|
24
29
|
readonly children: ReactNode;
|
|
25
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;AAOd,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE7E,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,yDAAyD;IACzD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAA;IAChC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAC7B,CAAA;CACF;AA2BD,UAAU,iBAA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CAC7B;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,GAAG,SAAS,CA4BzE"}
|
|
@@ -7,6 +7,13 @@ export interface TooltipProps {
|
|
|
7
7
|
readonly placement?: TooltipPlacement;
|
|
8
8
|
/** When true, the tooltip is never shown. */
|
|
9
9
|
readonly isDisabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Anchors the tooltip to an element you track yourself — e.g. the hovered cell of a grid — in
|
|
12
|
+
* place of a `TooltipTrigger`. It opens (after the usual hover delay) while `anchor` is an element
|
|
13
|
+
* and closes when it is null. Visual only: the anchor gets no `aria-describedby`, so use it for
|
|
14
|
+
* content already exposed to assistive technology, like a truncated value shown in full.
|
|
15
|
+
*/
|
|
16
|
+
readonly anchor?: Element | null;
|
|
10
17
|
}
|
|
11
18
|
export interface TooltipTriggerProps {
|
|
12
19
|
/**
|
|
@@ -19,7 +26,7 @@ export interface TooltipContentProps {
|
|
|
19
26
|
/** Tooltip content. Keep it brief — use a Popover for rich content. */
|
|
20
27
|
readonly children: ReactNode;
|
|
21
28
|
}
|
|
22
|
-
export declare function Tooltip({ children, placement, isDisabled, }: TooltipProps): ReactElement;
|
|
29
|
+
export declare function Tooltip({ children, placement, isDisabled, anchor, }: TooltipProps): ReactElement;
|
|
23
30
|
export declare function TooltipTrigger({ children }: TooltipTriggerProps): ReactElement;
|
|
24
31
|
export declare function TooltipContent({ children }: TooltipContentProps): ReactElement | null;
|
|
25
32
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EASf,MAAM,OAAO,CAAA;AAOd,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,GACV,OAAO,GACP,aAAa,GACb,WAAW,CAAA;AAyBf,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,0FAA0F;IAC1F,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAA;IACrC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAID,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAiB,EACjB,UAAkB,EAClB,MAAM,GACP,EAAE,YAAY,GAAG,YAAY,CAkH7B;AAID,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,GAAG,YAAY,CAiB9E;AAID,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,GAAG,YAAY,GAAG,IAAI,CAkBrF"}
|
package/dist/index.js
CHANGED
|
@@ -55,9 +55,6 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
55
55
|
(()=>{
|
|
56
56
|
__webpack_require__.nc = void 0;
|
|
57
57
|
})();
|
|
58
|
-
(()=>{
|
|
59
|
-
__webpack_require__.b = new URL("./", import.meta.url);
|
|
60
|
-
})();
|
|
61
58
|
__webpack_require__.add({
|
|
62
59
|
"../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[4].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[4].use[2]!./src/components/accordion.module.css" (module, __webpack_exports__, __webpack_require__) {
|
|
63
60
|
var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
@@ -1160,7 +1157,7 @@ __webpack_require__.add({
|
|
|
1160
1157
|
--_edge: light-dark(color-mix(in srgb, var(--ox0-color-border) 25%, var(--ox0-color-border-strong)), var(--ox0-color-border-strong));
|
|
1161
1158
|
}
|
|
1162
1159
|
|
|
1163
|
-
.inline-gS_3vk, .hinted-IDtzxY {
|
|
1160
|
+
.inline-gS_3vk, .danger-inline-DmIk_F, .hinted-IDtzxY {
|
|
1164
1161
|
--_shadow: none;
|
|
1165
1162
|
height: auto;
|
|
1166
1163
|
padding: 0;
|
|
@@ -1174,6 +1171,14 @@ __webpack_require__.add({
|
|
|
1174
1171
|
--_fg: var(--ox0-color-accent);
|
|
1175
1172
|
}
|
|
1176
1173
|
|
|
1174
|
+
.danger-inline-DmIk_F {
|
|
1175
|
+
--_fg: var(--ox0-color-danger);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.danger-inline-DmIk_F:not(:disabled):hover {
|
|
1179
|
+
--_fg: color-mix(in srgb, var(--ox0-color-danger) 82%, var(--ox0-color-foreground));
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1177
1182
|
.hinted-IDtzxY .content-A8tTMi {
|
|
1178
1183
|
text-underline-offset: 3px;
|
|
1179
1184
|
text-decoration: underline dotted;
|
|
@@ -1218,6 +1223,8 @@ __webpack_require__.add({
|
|
|
1218
1223
|
circle: "circle-Hk06Xp",
|
|
1219
1224
|
selected: "selected-ndu0qD",
|
|
1220
1225
|
inline: "inline-gS_3vk",
|
|
1226
|
+
"danger-inline": "danger-inline-DmIk_F",
|
|
1227
|
+
dangerInline: "danger-inline-DmIk_F",
|
|
1221
1228
|
hinted: "hinted-IDtzxY"
|
|
1222
1229
|
};
|
|
1223
1230
|
const __rspack_default_export = ___CSS_LOADER_EXPORT___;
|
|
@@ -1423,13 +1430,7 @@ __webpack_require__.add({
|
|
|
1423
1430
|
var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
|
|
1424
1431
|
var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
1425
1432
|
var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
|
|
1426
|
-
var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__rspack_import_2 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/getUrl.js");
|
|
1427
|
-
var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__rspack_import_2_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__rspack_import_2);
|
|
1428
|
-
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(__webpack_require__("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.4%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3.5 8.5l3 3 6-7%27/%3E%3C/svg%3E"), __webpack_require__.b);
|
|
1429
|
-
var ___CSS_LOADER_URL_IMPORT_1___ = new URL(__webpack_require__("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.4%27 stroke-linecap=%27round%27%3E%3Cpath d=%27M4 8h8%27/%3E%3C/svg%3E"), __webpack_require__.b);
|
|
1430
1433
|
var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
|
|
1431
|
-
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__rspack_import_2_default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
1432
|
-
var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__rspack_import_2_default()(___CSS_LOADER_URL_IMPORT_1___);
|
|
1433
1434
|
___CSS_LOADER_EXPORT___.push([
|
|
1434
1435
|
module.id,
|
|
1435
1436
|
`.control-TGnWDN {
|
|
@@ -1509,7 +1510,7 @@ label:hover > .control-TGnWDN[aria-invalid="true"]:not(:disabled) {
|
|
|
1509
1510
|
clip-path: inset(0 100% 0 0);
|
|
1510
1511
|
inline-size: calc(var(--choice-size) * .75);
|
|
1511
1512
|
transition: clip-path var(--ox0-duration-normal) var(--ox0-ease-enter);
|
|
1512
|
-
mask: url(
|
|
1513
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
1513
1514
|
}
|
|
1514
1515
|
|
|
1515
1516
|
.checkbox-WjpI54:checked:after {
|
|
@@ -1519,7 +1520,7 @@ label:hover > .control-TGnWDN[aria-invalid="true"]:not(:disabled) {
|
|
|
1519
1520
|
|
|
1520
1521
|
.checkbox-WjpI54:indeterminate:after {
|
|
1521
1522
|
clip-path: inset(0);
|
|
1522
|
-
mask-image: url(
|
|
1523
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E");
|
|
1523
1524
|
}
|
|
1524
1525
|
|
|
1525
1526
|
.radio-MbkWO9 {
|
|
@@ -4684,7 +4685,6 @@ label:hover > .control-TGnWDN[aria-invalid="true"]:not(:disabled) {
|
|
|
4684
4685
|
|
|
4685
4686
|
.determinate-WK75Ej .arc-DUVlPk {
|
|
4686
4687
|
stroke-linecap: butt;
|
|
4687
|
-
transition: stroke-dasharray var(--ox0-duration-slow) var(--ox0-ease-soft);
|
|
4688
4688
|
}
|
|
4689
4689
|
`,
|
|
4690
4690
|
""
|
|
@@ -5839,12 +5839,6 @@ div.tag-ueb2Qr.selected-a1JhC8[data-selectable]:hover {
|
|
|
5839
5839
|
A: __rspack_default_export
|
|
5840
5840
|
});
|
|
5841
5841
|
},
|
|
5842
|
-
"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.4%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3.5 8.5l3 3 6-7%27/%3E%3C/svg%3E" (module) {
|
|
5843
|
-
module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.4%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3.5 8.5l3 3 6-7%27/%3E%3C/svg%3E";
|
|
5844
|
-
},
|
|
5845
|
-
"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.4%27 stroke-linecap=%27round%27%3E%3Cpath d=%27M4 8h8%27/%3E%3C/svg%3E" (module) {
|
|
5846
|
-
module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.4%27 stroke-linecap=%27round%27%3E%3Cpath d=%27M4 8h8%27/%3E%3C/svg%3E";
|
|
5847
|
-
},
|
|
5848
5842
|
"../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/api.js" (module) {
|
|
5849
5843
|
module.exports = function(cssWithMappingToString) {
|
|
5850
5844
|
var list = [];
|
|
@@ -5898,17 +5892,6 @@ div.tag-ueb2Qr.selected-a1JhC8[data-selectable]:hover {
|
|
|
5898
5892
|
return list;
|
|
5899
5893
|
};
|
|
5900
5894
|
},
|
|
5901
|
-
"../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/getUrl.js" (module) {
|
|
5902
|
-
module.exports = function(url, options) {
|
|
5903
|
-
if (!options) options = {};
|
|
5904
|
-
if (!url) return url;
|
|
5905
|
-
url = String(url.__esModule ? url.default : url);
|
|
5906
|
-
if (/^['"].*['"]$/.test(url)) url = url.slice(1, -1);
|
|
5907
|
-
if (options.hash) url += options.hash;
|
|
5908
|
-
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
5909
|
-
return url;
|
|
5910
|
-
};
|
|
5911
|
-
},
|
|
5912
5895
|
"../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js" (module) {
|
|
5913
5896
|
module.exports = function(i) {
|
|
5914
5897
|
return i[1];
|
|
@@ -6617,6 +6600,22 @@ function CalendarGlyph({ size = 16 }) {
|
|
|
6617
6600
|
]
|
|
6618
6601
|
});
|
|
6619
6602
|
}
|
|
6603
|
+
const stack = [];
|
|
6604
|
+
function useLayer(isOpen) {
|
|
6605
|
+
const layerRef = useRef({});
|
|
6606
|
+
useEffect(()=>{
|
|
6607
|
+
if (!isOpen) return;
|
|
6608
|
+
const layer = layerRef.current;
|
|
6609
|
+
stack.push(layer);
|
|
6610
|
+
return ()=>{
|
|
6611
|
+
const index = stack.indexOf(layer);
|
|
6612
|
+
if (-1 !== index) stack.splice(index, 1);
|
|
6613
|
+
};
|
|
6614
|
+
}, [
|
|
6615
|
+
isOpen
|
|
6616
|
+
]);
|
|
6617
|
+
return useCallback(()=>stack.at(-1) === layerRef.current, []);
|
|
6618
|
+
}
|
|
6620
6619
|
const drawer_module_0 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[4].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[4].use[2]!./src/components/drawer.module.css");
|
|
6621
6620
|
var drawer_module_options = {};
|
|
6622
6621
|
drawer_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -6661,10 +6660,11 @@ function DrawerRoot({ children, isOpen, onClose, placement = "right", variant =
|
|
|
6661
6660
|
onClose,
|
|
6662
6661
|
titleId
|
|
6663
6662
|
]);
|
|
6663
|
+
const isTopLayer = useLayer(isOpen);
|
|
6664
6664
|
useEffect(()=>{
|
|
6665
6665
|
if (!isOpen) return;
|
|
6666
6666
|
const handler = (e)=>{
|
|
6667
|
-
if ("Escape" === e.key) {
|
|
6667
|
+
if ("Escape" === e.key && isTopLayer()) {
|
|
6668
6668
|
e.preventDefault();
|
|
6669
6669
|
if (!isDismissDisabled) onClose();
|
|
6670
6670
|
}
|
|
@@ -6674,21 +6674,33 @@ function DrawerRoot({ children, isOpen, onClose, placement = "right", variant =
|
|
|
6674
6674
|
}, [
|
|
6675
6675
|
isDismissDisabled,
|
|
6676
6676
|
isOpen,
|
|
6677
|
+
isTopLayer,
|
|
6677
6678
|
onClose
|
|
6678
6679
|
]);
|
|
6680
|
+
const pressedInsideRef = useRef(false);
|
|
6679
6681
|
useEffect(()=>{
|
|
6680
6682
|
if (!isOpen || "overlay" !== variant) return;
|
|
6683
|
+
const reset = ()=>{
|
|
6684
|
+
pressedInsideRef.current = false;
|
|
6685
|
+
};
|
|
6681
6686
|
const handler = (e)=>{
|
|
6682
|
-
|
|
6687
|
+
const pressedInside = pressedInsideRef.current;
|
|
6688
|
+
pressedInsideRef.current = false;
|
|
6689
|
+
if (isDismissDisabled || pressedInside || !isTopLayer()) return;
|
|
6683
6690
|
if (!(e.target instanceof Node)) return;
|
|
6684
6691
|
if (panelRef.current?.contains(e.target)) return;
|
|
6685
6692
|
onClose();
|
|
6686
6693
|
};
|
|
6694
|
+
document.addEventListener("pointerdown", reset, true);
|
|
6687
6695
|
document.addEventListener("pointerdown", handler);
|
|
6688
|
-
return ()=>
|
|
6696
|
+
return ()=>{
|
|
6697
|
+
document.removeEventListener("pointerdown", reset, true);
|
|
6698
|
+
document.removeEventListener("pointerdown", handler);
|
|
6699
|
+
};
|
|
6689
6700
|
}, [
|
|
6690
6701
|
isDismissDisabled,
|
|
6691
6702
|
isOpen,
|
|
6703
|
+
isTopLayer,
|
|
6692
6704
|
onClose,
|
|
6693
6705
|
variant
|
|
6694
6706
|
]);
|
|
@@ -6738,6 +6750,9 @@ function DrawerRoot({ children, isOpen, onClose, placement = "right", variant =
|
|
|
6738
6750
|
"data-variant": variant,
|
|
6739
6751
|
ref: panelRef,
|
|
6740
6752
|
style: panelStyle,
|
|
6753
|
+
onPointerDownCapture: ()=>{
|
|
6754
|
+
pressedInsideRef.current = true;
|
|
6755
|
+
},
|
|
6741
6756
|
onAnimationEnd: (e)=>{
|
|
6742
6757
|
if (e.target !== e.currentTarget) return;
|
|
6743
6758
|
if ("entering" === phase) setPhase("open");
|
|
@@ -6984,7 +6999,7 @@ function useTooltipContext() {
|
|
|
6984
6999
|
if (!ctx) throw new Error("TooltipTrigger and TooltipContent must be used inside <Tooltip>");
|
|
6985
7000
|
return ctx;
|
|
6986
7001
|
}
|
|
6987
|
-
function Tooltip({ children, placement = "top", isDisabled = false }) {
|
|
7002
|
+
function Tooltip({ children, placement = "top", isDisabled = false, anchor }) {
|
|
6988
7003
|
const [open, setOpen] = useState(false);
|
|
6989
7004
|
const openTimerRef = useRef(null);
|
|
6990
7005
|
const isHoveringRef = useRef(false);
|
|
@@ -7069,6 +7084,31 @@ function Tooltip({ children, placement = "top", isDisabled = false }) {
|
|
|
7069
7084
|
tryClose();
|
|
7070
7085
|
}
|
|
7071
7086
|
});
|
|
7087
|
+
const isAnchored = void 0 !== anchor;
|
|
7088
|
+
useEffect(()=>{
|
|
7089
|
+
if (!isAnchored) return;
|
|
7090
|
+
refs.setReference(anchor ?? null);
|
|
7091
|
+
isHoveringRef.current = null !== anchor;
|
|
7092
|
+
let timer;
|
|
7093
|
+
if (null === anchor) tryClose();
|
|
7094
|
+
else if (0 === tooltipManager.getDelay()) doOpen();
|
|
7095
|
+
else {
|
|
7096
|
+
clearOpenTimer();
|
|
7097
|
+
timer = setTimeout(()=>{
|
|
7098
|
+
openTimerRef.current = null;
|
|
7099
|
+
doOpen();
|
|
7100
|
+
}, tooltipManager.getDelay());
|
|
7101
|
+
openTimerRef.current = timer;
|
|
7102
|
+
}
|
|
7103
|
+
return ()=>clearTimeout(timer);
|
|
7104
|
+
}, [
|
|
7105
|
+
anchor,
|
|
7106
|
+
isAnchored,
|
|
7107
|
+
refs,
|
|
7108
|
+
doOpen,
|
|
7109
|
+
tryClose,
|
|
7110
|
+
clearOpenTimer
|
|
7111
|
+
]);
|
|
7072
7112
|
const value = {
|
|
7073
7113
|
open,
|
|
7074
7114
|
isDisabled,
|
|
@@ -8247,7 +8287,13 @@ choice_module_options.domAPI = styleDomAPI_default();
|
|
|
8247
8287
|
choice_module_options.insertStyleElement = insertStyleElement_default();
|
|
8248
8288
|
injectStylesIntoStyleTag_default()(choice_module_0.A, choice_module_options);
|
|
8249
8289
|
const choice_module = choice_module_0.A && choice_module_0.A.locals ? choice_module_0.A.locals : void 0;
|
|
8250
|
-
const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function({ label, description, isDisabled, isInvalid, isSelected, defaultSelected, errorMessage, onChange, id: idProp, ...restProps }, ref) {
|
|
8290
|
+
const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function({ label, description, isDisabled, isInvalid, isSelected, isIndeterminate = false, defaultSelected, errorMessage, onChange, id: idProp, ...restProps }, ref) {
|
|
8291
|
+
const inputRef = useRef(null);
|
|
8292
|
+
useLayoutEffect(()=>{
|
|
8293
|
+
if (inputRef.current) inputRef.current.indeterminate = isIndeterminate;
|
|
8294
|
+
}, [
|
|
8295
|
+
isIndeterminate
|
|
8296
|
+
]);
|
|
8251
8297
|
const { style: layoutStyle } = useLayoutItem(restProps);
|
|
8252
8298
|
const [, props] = splitLayoutItemProps(restProps);
|
|
8253
8299
|
const generatedId = useId();
|
|
@@ -8268,7 +8314,11 @@ const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function({ label, description
|
|
|
8268
8314
|
children: [
|
|
8269
8315
|
/*#__PURE__*/ jsx("input", {
|
|
8270
8316
|
...props,
|
|
8271
|
-
ref:
|
|
8317
|
+
ref: (node)=>{
|
|
8318
|
+
inputRef.current = node;
|
|
8319
|
+
if ("function" == typeof ref) ref(node);
|
|
8320
|
+
else if (ref) ref.current = node;
|
|
8321
|
+
},
|
|
8272
8322
|
"aria-describedby": describedBy,
|
|
8273
8323
|
"aria-invalid": invalid || void 0,
|
|
8274
8324
|
checked: isSelected,
|
|
@@ -8807,6 +8857,7 @@ function DialogRoot({ children, isDismissDisabled, isEphemeral, isOpen, maxHeigh
|
|
|
8807
8857
|
onClose,
|
|
8808
8858
|
titleId
|
|
8809
8859
|
]);
|
|
8860
|
+
const isTopLayer = useLayer(isOpen);
|
|
8810
8861
|
useEffect(()=>{
|
|
8811
8862
|
if (!isOpen) return;
|
|
8812
8863
|
const previouslyFocused = document.activeElement;
|
|
@@ -8824,7 +8875,7 @@ function DialogRoot({ children, isDismissDisabled, isEphemeral, isOpen, maxHeigh
|
|
|
8824
8875
|
useEffect(()=>{
|
|
8825
8876
|
if (!isOpen) return;
|
|
8826
8877
|
const handler = (e)=>{
|
|
8827
|
-
if ("Escape" === e.key) {
|
|
8878
|
+
if ("Escape" === e.key && isTopLayer()) {
|
|
8828
8879
|
e.preventDefault();
|
|
8829
8880
|
if (!isDismissDisabled) onClose();
|
|
8830
8881
|
}
|
|
@@ -8834,6 +8885,7 @@ function DialogRoot({ children, isDismissDisabled, isEphemeral, isOpen, maxHeigh
|
|
|
8834
8885
|
}, [
|
|
8835
8886
|
isDismissDisabled,
|
|
8836
8887
|
isOpen,
|
|
8888
|
+
isTopLayer,
|
|
8837
8889
|
onClose
|
|
8838
8890
|
]);
|
|
8839
8891
|
if (!isVisible) return null;
|
|
@@ -8980,6 +9032,7 @@ function ConfirmPopover({ anchor, cancelLabel, children, confirmLabel, isOpen, o
|
|
|
8980
9032
|
const defaultConfirm = useMessage("ox0.confirm.confirm", "Confirm");
|
|
8981
9033
|
const defaultCancel = useMessage("ox0.confirm.cancel", "Cancel");
|
|
8982
9034
|
const cancelRef = useRef(null);
|
|
9035
|
+
useLayer(isOpen);
|
|
8983
9036
|
const { refs: { setFloating }, floatingStyles, context } = useFloating({
|
|
8984
9037
|
elements: {
|
|
8985
9038
|
reference: anchor
|
|
@@ -11174,6 +11227,9 @@ function useToast() {
|
|
|
11174
11227
|
if (!ctx) throw new Error("useToast must be used inside ToastProvider");
|
|
11175
11228
|
return ctx;
|
|
11176
11229
|
}
|
|
11230
|
+
function useOptionalToast() {
|
|
11231
|
+
return useContext(ToastContext);
|
|
11232
|
+
}
|
|
11177
11233
|
function ToastProvider({ children }) {
|
|
11178
11234
|
const [toasts, dispatch] = useReducer(reducer, []);
|
|
11179
11235
|
const addToast = useCallback((options)=>{
|
|
@@ -14106,4 +14162,4 @@ function useDensity(options) {
|
|
|
14106
14162
|
function useFontScale(options) {
|
|
14107
14163
|
return useThemePreference("fontScale", options);
|
|
14108
14164
|
}
|
|
14109
|
-
export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AppShell, BreadcrumbItem, Breadcrumbs, ConfirmDialog, ConfirmPopover, ConfirmProvider, DateField, Dialog, Drawer, GlobalSearch, ListBox, ListBoxFilter, ListItem, ListItemDivider, ListItemGroup, ListItemStatic, MarkProvider, Markable, Menu, MenuItem, MenuSection, MenuSeparator, MenuSubTrigger, Nav, NavItem, Ox0Provider, Popover, PopoverContent, PopoverTrigger, SearchResult, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, TagGroup, ToastProvider, Tooltip, TooltipContent, TooltipTrigger, badge_Badge as Badge, banner_Banner as Banner, box_Box as Box, button_Button as Button, button_group_ButtonGroup as ButtonGroup, caption_Caption as Caption, card_Card as Card, checkbox_Checkbox as Checkbox, checkbox_group_CheckboxGroup as CheckboxGroup, checkbox_group_GroupCheckbox as GroupCheckbox, code_Code as Code, code_block_CodeBlock as CodeBlock, combobox_Combobox as Combobox, createTextStyles, date_time_DateRange as DateRange, date_time_DateTime as DateTime, defaultUiMessages, defineSearchSource, disclosure_triangle_DisclosureTriangle as DisclosureTriangle, divider_Divider as Divider, drop_zone_DropZone as DropZone, field_group_FieldGroup as FieldGroup, file_trigger_FileTrigger as FileTrigger, grid_Grid as Grid, heading_Heading as Heading, icon_button_IconButton as IconButton, icon_label_IconLabel as IconLabel, icon_toggle_IconToggle as IconToggle, inline_Inline as Inline, keyboard_Keyboard as Keyboard, label_Label as Label, link_Link as Link, matchSearchItems, matchesAccept, number_field_NumberField as NumberField, numeric_Numeric as Numeric, page_Page as Page, page_PageHeader as PageHeader, radio_group_Radio as Radio, radio_group_RadioGroup as RadioGroup, search_field_SearchField as SearchField, select_Select as Select, skeleton_Skeleton as Skeleton, slider_Slider as Slider, spinner_Spinner as Spinner, splitLayoutItemProps, split_Split as Split, stack_Stack as Stack, surface_Surface as Surface, switch_Switch as Switch, tag_group_Tag as Tag, text_Text as Text, text_area_TextArea as TextArea, text_field_TextField as TextField, useBorders, useBreakpointUp, useColorScheme, useConfirm, useDateFormat, useDensity, useFlexItem, useFontScale, useGlobalSearch, useGridItem, useLayoutItem, useListItemState, useMark, useNeutralTheme, usePlacement, useResponsiveValue, useSizing, useSpacing, useSurface, useToast };
|
|
14165
|
+
export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AppShell, BreadcrumbItem, Breadcrumbs, ConfirmDialog, ConfirmPopover, ConfirmProvider, DateField, Dialog, Drawer, GlobalSearch, ListBox, ListBoxFilter, ListItem, ListItemDivider, ListItemGroup, ListItemStatic, MarkProvider, Markable, Menu, MenuItem, MenuSection, MenuSeparator, MenuSubTrigger, Nav, NavItem, Ox0Provider, Popover, PopoverContent, PopoverTrigger, SearchResult, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, TagGroup, ToastProvider, Tooltip, TooltipContent, TooltipTrigger, badge_Badge as Badge, banner_Banner as Banner, box_Box as Box, button_Button as Button, button_group_ButtonGroup as ButtonGroup, caption_Caption as Caption, card_Card as Card, checkbox_Checkbox as Checkbox, checkbox_group_CheckboxGroup as CheckboxGroup, checkbox_group_GroupCheckbox as GroupCheckbox, code_Code as Code, code_block_CodeBlock as CodeBlock, combobox_Combobox as Combobox, createTextStyles, date_time_DateRange as DateRange, date_time_DateTime as DateTime, defaultUiMessages, defineSearchSource, disclosure_triangle_DisclosureTriangle as DisclosureTriangle, divider_Divider as Divider, drop_zone_DropZone as DropZone, field_group_FieldGroup as FieldGroup, file_trigger_FileTrigger as FileTrigger, grid_Grid as Grid, heading_Heading as Heading, icon_button_IconButton as IconButton, icon_label_IconLabel as IconLabel, icon_toggle_IconToggle as IconToggle, inline_Inline as Inline, keyboard_Keyboard as Keyboard, label_Label as Label, link_Link as Link, matchSearchItems, matchesAccept, number_field_NumberField as NumberField, numeric_Numeric as Numeric, page_Page as Page, page_PageHeader as PageHeader, radio_group_Radio as Radio, radio_group_RadioGroup as RadioGroup, search_field_SearchField as SearchField, select_Select as Select, skeleton_Skeleton as Skeleton, slider_Slider as Slider, spinner_Spinner as Spinner, splitLayoutItemProps, split_Split as Split, stack_Stack as Stack, surface_Surface as Surface, switch_Switch as Switch, tag_group_Tag as Tag, text_Text as Text, text_area_TextArea as TextArea, text_field_TextField as TextField, useBorders, useBreakpointUp, useColorScheme, useConfirm, useDateFormat, useDensity, useFlexItem, useFontScale, useGlobalSearch, useGridItem, useLayoutItem, useListItemState, useMark, useNeutralTheme, useOptionalToast, usePlacement, useResponsiveValue, useSizing, useSpacing, useSurface, useToast };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox0/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/esturcke/ox0-platform.git",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@internationalized/date": "^3.12.4",
|
|
26
26
|
"react-aria": "^3.52.1",
|
|
27
27
|
"react-stately": "^3.50.0",
|
|
28
|
-
"@ox0/hooks": "0.
|
|
28
|
+
"@ox0/hooks": "0.4.0",
|
|
29
29
|
"@ox0/i18n": "0.4.0",
|
|
30
|
-
"@ox0/tokens": "0.
|
|
30
|
+
"@ox0/tokens": "0.8.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": "^19.0.0",
|