@techsio/ui-kit 0.41.1 → 0.42.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/README.md +2 -1
- package/dist/atoms/numeric-input.js +3 -3
- package/dist/atoms/rating.js +3 -3
- package/dist/atoms/tooltip.js +3 -3
- package/dist/internal/molecules/drawer.context.js +133 -0
- package/dist/internal/molecules/drawer.styles.js +107 -0
- package/dist/internal/organisms/sidebar.context.js +223 -0
- package/dist/internal/organisms/sidebar.focus.js +169 -0
- package/dist/internal/organisms/sidebar.styles.js +146 -0
- package/dist/molecules/accordion.js +3 -3
- package/dist/molecules/carousel.js +3 -3
- package/dist/molecules/chart.js +1 -1
- package/dist/molecules/dialog.js +3 -3
- package/dist/molecules/drawer.js +262 -0
- package/dist/molecules/menu.js +5 -5
- package/dist/molecules/radio-group.js +3 -3
- package/dist/molecules/select.js +4 -4
- package/dist/molecules/slider.js +3 -3
- package/dist/molecules/switch.js +3 -3
- package/dist/molecules/tabs.js +3 -3
- package/dist/molecules/toast.js +6 -6
- package/dist/molecules/tree-view.js +4 -4
- package/dist/organisms/data-table.fields.js +1 -1
- package/dist/organisms/data-table.js +7 -7
- package/dist/organisms/sidebar.js +448 -0
- package/dist/src/atoms/action-icon.d.ts +1 -1
- package/dist/src/atoms/button.d.ts +1 -1
- package/dist/src/atoms/link-button.d.ts +1 -1
- package/dist/src/atoms/numeric-input.d.ts +1 -1
- package/dist/src/atoms/status-text.d.ts +1 -1
- package/dist/src/internal/molecules/drawer.context.d.ts +53 -0
- package/dist/src/internal/molecules/drawer.context.d.ts.map +1 -0
- package/dist/src/internal/molecules/drawer.styles.d.ts +115 -0
- package/dist/src/internal/molecules/drawer.styles.d.ts.map +1 -0
- package/dist/src/internal/organisms/sidebar.context.d.ts +83 -0
- package/dist/src/internal/organisms/sidebar.context.d.ts.map +1 -0
- package/dist/src/internal/organisms/sidebar.focus.d.ts +16 -0
- package/dist/src/internal/organisms/sidebar.focus.d.ts.map +1 -0
- package/dist/src/internal/organisms/sidebar.styles.d.ts +149 -0
- package/dist/src/internal/organisms/sidebar.styles.d.ts.map +1 -0
- package/dist/src/molecules/accordion.d.ts +1 -1
- package/dist/src/molecules/breadcrumb.d.ts +2 -2
- package/dist/src/molecules/carousel.d.ts +2 -2
- package/dist/src/molecules/combobox.d.ts +1 -1
- package/dist/src/molecules/drawer.d.ts +112 -0
- package/dist/src/molecules/drawer.d.ts.map +1 -0
- package/dist/src/molecules/form-input.d.ts +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +1 -1
- package/dist/src/molecules/form-textarea.d.ts +1 -1
- package/dist/src/molecules/menu.d.ts +1 -1
- package/dist/src/molecules/pagination.d.ts +1 -1
- package/dist/src/molecules/phone-input.d.ts +3 -3
- package/dist/src/molecules/popover.d.ts +1 -1
- package/dist/src/molecules/product-card.d.ts +4 -4
- package/dist/src/molecules/radio-card.d.ts +2 -2
- package/dist/src/molecules/radio-group.d.ts +2 -2
- package/dist/src/molecules/search-form.d.ts +5 -5
- package/dist/src/molecules/select.d.ts +1 -1
- package/dist/src/molecules/steps.d.ts +1 -1
- package/dist/src/molecules/switch.d.ts +3 -3
- package/dist/src/molecules/tabs.d.ts +1 -1
- package/dist/src/molecules/toast.d.ts +6 -6
- package/dist/src/molecules/tree-view.d.ts +1 -1
- package/dist/src/organisms/data-table.d.ts +8 -8
- package/dist/src/organisms/data-table.fields.d.ts +2 -2
- package/dist/src/organisms/data-table.helpers.d.ts +1 -1
- package/dist/src/organisms/gallery.d.ts +2 -2
- package/dist/src/organisms/sidebar.d.ts +93 -0
- package/dist/src/organisms/sidebar.d.ts.map +1 -0
- package/dist/src/templates/accordion.d.ts +2 -2
- package/dist/src/templates/breadcrumb.d.ts +2 -2
- package/dist/src/templates/carousel.d.ts +2 -2
- package/dist/src/templates/gallery.d.ts +3 -3
- package/dist/src/templates/numeric-input.d.ts +2 -2
- package/dist/src/templates/popover.d.ts +1 -1
- package/dist/src/templates/product-card.d.ts +2 -2
- package/dist/src/templates/select.d.ts +1 -1
- package/dist/src/templates/tabs.d.ts +1 -1
- package/dist/src/theme/theme-provider.d.ts +1 -1
- package/dist/src/types/zag.d.ts +1 -0
- package/dist/src/types/zag.d.ts.map +1 -1
- package/dist/stories/atoms/badge.stories.d.ts +1 -1
- package/dist/stories/atoms/button.stories.d.ts +1 -1
- package/dist/stories/atoms/checkbox.stories.d.ts +1 -1
- package/dist/stories/atoms/icon.stories.d.ts +1 -1
- package/dist/stories/atoms/image.stories.d.ts +1 -1
- package/dist/stories/atoms/input.stories.d.ts +1 -1
- package/dist/stories/atoms/numeric-input.stories.d.ts +1 -1
- package/dist/stories/atoms/rating.stories.d.ts +1 -1
- package/dist/stories/atoms/skeleton.stories.d.ts +1 -1
- package/dist/stories/atoms/status-text.stories.d.ts +1 -1
- package/dist/stories/atoms/textarea.stories.d.ts +1 -1
- package/dist/stories/atoms/tooltip.stories.d.ts +2 -2
- package/dist/stories/changelog/changelog.stories.d.ts.map +1 -1
- package/dist/stories/helpers/icon-options.d.ts +1 -1
- package/dist/stories/molecules/accordion.stories.d.ts +1 -1
- package/dist/stories/molecules/breadcrumb.stories.d.ts +1 -1
- package/dist/stories/molecules/carousel.stories.d.ts +1 -1
- package/dist/stories/molecules/chart.stories.d.ts +1 -1
- package/dist/stories/molecules/color-select.stories.d.ts +1 -1
- package/dist/stories/molecules/combobox.stories.d.ts +1 -1
- package/dist/stories/molecules/dialog.stories.d.ts +1 -1
- package/dist/stories/molecules/drawer.stories.d.ts +158 -0
- package/dist/stories/molecules/drawer.stories.d.ts.map +1 -0
- package/dist/stories/molecules/form-checkbox.stories.d.ts +1 -1
- package/dist/stories/molecules/form-input.stories.d.ts +1 -1
- package/dist/stories/molecules/form-numeric-input.stories.d.ts +1 -1
- package/dist/stories/molecules/form-textarea.stories.d.ts +1 -1
- package/dist/stories/molecules/menu.stories.d.ts +1 -1
- package/dist/stories/molecules/pagination.stories.d.ts +1 -1
- package/dist/stories/molecules/phone-input.stories.d.ts +1 -1
- package/dist/stories/molecules/popover.stories.d.ts +1 -1
- package/dist/stories/molecules/product-card.stories.d.ts +1 -1
- package/dist/stories/molecules/radio-card.stories.d.ts +1 -1
- package/dist/stories/molecules/radio-group.stories.d.ts +1 -1
- package/dist/stories/molecules/search-form.stories.d.ts +1 -1
- package/dist/stories/molecules/select.stories.d.ts +1 -1
- package/dist/stories/molecules/slider.stories.d.ts +1 -1
- package/dist/stories/molecules/steps.stories.d.ts +1 -1
- package/dist/stories/molecules/switch.stories.d.ts +1 -1
- package/dist/stories/molecules/tabs.stories.d.ts +1 -1
- package/dist/stories/molecules/tree-view.stories.d.ts +1 -1
- package/dist/stories/organisms/data-table.stories.d.ts +1 -1
- package/dist/stories/organisms/footer.stories.d.ts +1 -1
- package/dist/stories/organisms/gallery.stories.d.ts +2 -2
- package/dist/stories/organisms/header.stories.d.ts +1 -1
- package/dist/stories/organisms/sidebar.stories.d.ts +66 -0
- package/dist/stories/organisms/sidebar.stories.d.ts.map +1 -0
- package/dist/stories/organisms/table.stories.d.ts +1 -1
- package/dist/stories/templates/accordion.stories.d.ts +1 -1
- package/dist/stories/templates/breadcrumb.stories.d.ts +1 -1
- package/dist/stories/templates/carousel.stories.d.ts +1 -1
- package/dist/stories/templates/gallery.stories.d.ts +1 -1
- package/dist/stories/templates/numeric-input.stories.d.ts +1 -1
- package/dist/stories/templates/popover.stories.d.ts +1 -1
- package/dist/stories/templates/product-card.stories.d.ts +1 -1
- package/dist/stories/templates/select.stories.d.ts +1 -1
- package/dist/stories/templates/tabs.stories.d.ts +1 -1
- package/dist/test/drawer.behavior.spec.d.ts +2 -0
- package/dist/test/drawer.behavior.spec.d.ts.map +1 -0
- package/dist/test/sidebar.behavior.spec.d.ts +2 -0
- package/dist/test/sidebar.behavior.spec.d.ts.map +1 -0
- package/dist/test/sidebar.ssr.bun.d.ts +2 -0
- package/dist/test/sidebar.ssr.bun.d.ts.map +1 -0
- package/dist/theme/theme-provider.js +4 -4
- package/dist/theme/theme-toggle.js +1 -1
- package/package.json +43 -33
- package/src/tokens/components/components.css +2 -0
- package/src/tokens/components/molecules/_drawer.css +369 -0
- package/src/tokens/components/organisms/_sidebar.css +93 -0
- package/src/tokens/styles.d.ts +3 -0
package/dist/molecules/menu.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { connect, machine } from "@zag-js/menu";
|
|
3
2
|
import { Portal, normalizeProps, useMachine } from "@zag-js/react";
|
|
4
3
|
import { cloneElement, isValidElement, useEffect, useId } from "react";
|
|
5
4
|
import { tv } from "tailwind-variants";
|
|
6
5
|
import { Button } from "../atoms/button.js";
|
|
7
6
|
import { Icon } from "../atoms/icon.js";
|
|
7
|
+
import * as __rspack_external__zag_js_menu_d3b38dd2 from "@zag-js/menu";
|
|
8
8
|
const menuVariants = tv({
|
|
9
9
|
slots: {
|
|
10
10
|
trigger: "",
|
|
@@ -73,12 +73,12 @@ const menuVariants = tv({
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
function SubmenuItem({ item, parentApi, parentService, size = "md", onCheckedChange, onSelect, closeOnSelect = true }) {
|
|
76
|
-
const submenuService = useMachine(machine, {
|
|
76
|
+
const submenuService = useMachine(__rspack_external__zag_js_menu_d3b38dd2.machine, {
|
|
77
77
|
id: useId(),
|
|
78
78
|
closeOnSelect,
|
|
79
79
|
onSelect
|
|
80
80
|
});
|
|
81
|
-
const submenuApi = connect(submenuService, normalizeProps);
|
|
81
|
+
const submenuApi = __rspack_external__zag_js_menu_d3b38dd2.connect(submenuService, normalizeProps);
|
|
82
82
|
useEffect(()=>{
|
|
83
83
|
parentApi.setChild(submenuService);
|
|
84
84
|
submenuApi.setParent(parentService);
|
|
@@ -184,7 +184,7 @@ function SubmenuItem({ item, parentApi, parentService, size = "md", onCheckedCha
|
|
|
184
184
|
}
|
|
185
185
|
function Menu({ "aria-label": ariaLabel, dir, id, closeOnSelect = true, loopFocus = true, typeahead = true, positioning, anchorPoint, open, defaultOpen, composite, navigate, defaultHighlightedValue, highlightedValue, onHighlightChange, onSelect, onOpenChange, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, onFocusOutside, items, triggerText = "Menu", triggerIcon, customTrigger, size = "md", onCheckedChange }) {
|
|
186
186
|
const generatedId = useId();
|
|
187
|
-
const service = useMachine(machine, {
|
|
187
|
+
const service = useMachine(__rspack_external__zag_js_menu_d3b38dd2.machine, {
|
|
188
188
|
id: id || generatedId,
|
|
189
189
|
dir,
|
|
190
190
|
closeOnSelect,
|
|
@@ -207,7 +207,7 @@ function Menu({ "aria-label": ariaLabel, dir, id, closeOnSelect = true, loopFocu
|
|
|
207
207
|
onHighlightChange,
|
|
208
208
|
"aria-label": ariaLabel
|
|
209
209
|
});
|
|
210
|
-
const api = connect(service, normalizeProps);
|
|
210
|
+
const api = __rspack_external__zag_js_menu_d3b38dd2.connect(service, normalizeProps);
|
|
211
211
|
const { trigger, positioner, content, separator, optionItem, item: itemSlot, itemIcon, itemText, itemIndicator } = menuVariants({
|
|
212
212
|
size
|
|
213
213
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { connect, machine } from "@zag-js/radio-group";
|
|
3
2
|
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
4
3
|
import { createContext, useContext, useId } from "react";
|
|
5
4
|
import { Label } from "../atoms/label.js";
|
|
6
5
|
import { StatusText } from "../atoms/status-text.js";
|
|
7
6
|
import { tv } from "../utils.js";
|
|
7
|
+
import * as __rspack_external__zag_js_radio_group_44acf138 from "@zag-js/radio-group";
|
|
8
8
|
const radioGroupVariants = tv({
|
|
9
9
|
slots: {
|
|
10
10
|
root: [
|
|
@@ -144,7 +144,7 @@ function RadioGroup({ id: providedId, disabled = false, required = false, orient
|
|
|
144
144
|
const generatedId = useId();
|
|
145
145
|
const id = providedId || generatedId;
|
|
146
146
|
const invalid = "error" === validateStatus;
|
|
147
|
-
const service = useMachine(machine, {
|
|
147
|
+
const service = useMachine(__rspack_external__zag_js_radio_group_44acf138.machine, {
|
|
148
148
|
...machineProps,
|
|
149
149
|
id,
|
|
150
150
|
disabled,
|
|
@@ -155,7 +155,7 @@ function RadioGroup({ id: providedId, disabled = false, required = false, orient
|
|
|
155
155
|
onValueChange?.(nextValue);
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
|
-
const api = connect(service, normalizeProps);
|
|
158
|
+
const api = __rspack_external__zag_js_radio_group_44acf138.connect(service, normalizeProps);
|
|
159
159
|
const styles = radioGroupVariants({
|
|
160
160
|
size,
|
|
161
161
|
variant
|
package/dist/molecules/select.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Portal, normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
-
import { collection as select_collection, connect, machine } from "@zag-js/select";
|
|
4
3
|
import { createContext, useContext, useId } from "react";
|
|
5
4
|
import { tv } from "tailwind-variants";
|
|
6
5
|
import { ActionIcon } from "../atoms/action-icon.js";
|
|
@@ -8,6 +7,7 @@ import { Button } from "../atoms/button.js";
|
|
|
8
7
|
import { Icon } from "../atoms/icon.js";
|
|
9
8
|
import { Label } from "../atoms/label.js";
|
|
10
9
|
import { StatusText } from "../atoms/status-text.js";
|
|
10
|
+
import * as __rspack_external__zag_js_select_2818cf80 from "@zag-js/select";
|
|
11
11
|
const toControlSize = (size)=>"xs" === size ? "sm" : size;
|
|
12
12
|
const controlGlyphClass = {
|
|
13
13
|
sm: "text-icon-control-sm",
|
|
@@ -149,13 +149,13 @@ function Select({ items, id: providedId, size = "md", value, defaultValue, multi
|
|
|
149
149
|
const generatedId = useId();
|
|
150
150
|
const id = providedId || generatedId;
|
|
151
151
|
const invalid = "error" === validateStatus;
|
|
152
|
-
const collection =
|
|
152
|
+
const collection = __rspack_external__zag_js_select_2818cf80.collection({
|
|
153
153
|
items,
|
|
154
154
|
itemToString: (item)=>item.displayValue || item.value,
|
|
155
155
|
itemToValue: (item)=>item.value,
|
|
156
156
|
isItemDisabled: (item)=>!!item.disabled
|
|
157
157
|
});
|
|
158
|
-
const service = useMachine(machine, {
|
|
158
|
+
const service = useMachine(__rspack_external__zag_js_select_2818cf80.machine, {
|
|
159
159
|
id,
|
|
160
160
|
collection,
|
|
161
161
|
name,
|
|
@@ -173,7 +173,7 @@ function Select({ items, id: providedId, size = "md", value, defaultValue, multi
|
|
|
173
173
|
onOpenChange,
|
|
174
174
|
onHighlightChange
|
|
175
175
|
});
|
|
176
|
-
const api = connect(service, normalizeProps);
|
|
176
|
+
const api = __rspack_external__zag_js_select_2818cf80.connect(service, normalizeProps);
|
|
177
177
|
const styles = selectVariants({
|
|
178
178
|
size
|
|
179
179
|
});
|
package/dist/molecules/slider.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
-
import { connect, machine } from "@zag-js/slider";
|
|
4
3
|
import { useId } from "react";
|
|
5
4
|
import { Label } from "../atoms/label.js";
|
|
6
5
|
import { StatusText } from "../atoms/status-text.js";
|
|
7
6
|
import { slugify, tv } from "../utils.js";
|
|
7
|
+
import * as __rspack_external__zag_js_slider_b64ec793 from "@zag-js/slider";
|
|
8
8
|
const sliderVariants = tv({
|
|
9
9
|
slots: {
|
|
10
10
|
root: [
|
|
@@ -222,7 +222,7 @@ function Slider({ id, name, label, validateStatus, helpText, showHelpTextIcon =
|
|
|
222
222
|
const resolvedValue = isControlled ? normalizeSliderValues(value, fallbackValues, resolvedConfig) : void 0;
|
|
223
223
|
const resolvedDefaultValue = isControlled ? void 0 : normalizeSliderValues(defaultValue, fallbackValues, resolvedConfig);
|
|
224
224
|
const valueTextValues = apiValueFallback(resolvedValue, resolvedDefaultValue, fallbackValues);
|
|
225
|
-
const service = useMachine(machine, {
|
|
225
|
+
const service = useMachine(__rspack_external__zag_js_slider_b64ec793.machine, {
|
|
226
226
|
id: uniqueId,
|
|
227
227
|
name,
|
|
228
228
|
value: resolvedValue,
|
|
@@ -240,7 +240,7 @@ function Slider({ id, name, label, validateStatus, helpText, showHelpTextIcon =
|
|
|
240
240
|
onValueChange: (details)=>onChange?.(details.value),
|
|
241
241
|
onValueChangeEnd: (details)=>onChangeEnd?.(details.value)
|
|
242
242
|
});
|
|
243
|
-
const api = connect(service, normalizeProps);
|
|
243
|
+
const api = __rspack_external__zag_js_slider_b64ec793.connect(service, normalizeProps);
|
|
244
244
|
const { root, label: labelSlot, control, track, range, thumb, header, value: valueSlot, markerGroup, marker, markerLine, markerText } = sliderVariants({
|
|
245
245
|
className,
|
|
246
246
|
size
|
package/dist/molecules/switch.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
-
import { connect, machine } from "@zag-js/switch";
|
|
4
3
|
import { useId } from "react";
|
|
5
4
|
import { Label } from "../atoms/label.js";
|
|
6
5
|
import { StatusText } from "../atoms/status-text.js";
|
|
7
6
|
import { tv } from "../utils.js";
|
|
7
|
+
import * as __rspack_external__zag_js_switch_171a0128 from "@zag-js/switch";
|
|
8
8
|
const switchVariants = tv({
|
|
9
9
|
slots: {
|
|
10
10
|
root: [
|
|
@@ -49,7 +49,7 @@ const switchVariants = tv({
|
|
|
49
49
|
function Switch({ id, name, value, checked, defaultChecked, disabled = false, readOnly = false, required = false, dir = "ltr", children, className, onCheckedChange, validateStatus, helpText, showHelpTextIcon = true }) {
|
|
50
50
|
const generatedId = useId();
|
|
51
51
|
const uniqueId = id || generatedId;
|
|
52
|
-
const service = useMachine(machine, {
|
|
52
|
+
const service = useMachine(__rspack_external__zag_js_switch_171a0128.machine, {
|
|
53
53
|
id: uniqueId,
|
|
54
54
|
name,
|
|
55
55
|
value,
|
|
@@ -62,7 +62,7 @@ function Switch({ id, name, value, checked, defaultChecked, disabled = false, re
|
|
|
62
62
|
required,
|
|
63
63
|
onCheckedChange: ({ checked })=>onCheckedChange?.(checked)
|
|
64
64
|
});
|
|
65
|
-
const api = connect(service, normalizeProps);
|
|
65
|
+
const api = __rspack_external__zag_js_switch_171a0128.connect(service, normalizeProps);
|
|
66
66
|
const { root, control, thumb, label, hiddenInput } = switchVariants({
|
|
67
67
|
className
|
|
68
68
|
});
|
package/dist/molecules/tabs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
-
import { connect, machine } from "@zag-js/tabs";
|
|
4
3
|
import { createContext, useContext, useId } from "react";
|
|
5
4
|
import { Button } from "../atoms/button.js";
|
|
6
5
|
import { tv } from "../utils.js";
|
|
6
|
+
import * as __rspack_external__zag_js_tabs_b98983a9 from "@zag-js/tabs";
|
|
7
7
|
const tabsVariants = tv({
|
|
8
8
|
slots: {
|
|
9
9
|
root: [
|
|
@@ -116,7 +116,7 @@ function useTabsContext() {
|
|
|
116
116
|
function Tabs({ id, defaultValue, value, orientation = "horizontal", dir = "ltr", activationMode = "automatic", loopFocus = true, onValueChange, variant, size, fitted, justify, children, ref, className, ...props }) {
|
|
117
117
|
const generatedId = useId();
|
|
118
118
|
const uniqueId = id || generatedId;
|
|
119
|
-
const service = useMachine(machine, {
|
|
119
|
+
const service = useMachine(__rspack_external__zag_js_tabs_b98983a9.machine, {
|
|
120
120
|
id: uniqueId,
|
|
121
121
|
value,
|
|
122
122
|
defaultValue,
|
|
@@ -128,7 +128,7 @@ function Tabs({ id, defaultValue, value, orientation = "horizontal", dir = "ltr"
|
|
|
128
128
|
onValueChange?.(value);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
const api = connect(service, normalizeProps);
|
|
131
|
+
const api = __rspack_external__zag_js_tabs_b98983a9.connect(service, normalizeProps);
|
|
132
132
|
const styles = tabsVariants({
|
|
133
133
|
variant,
|
|
134
134
|
size,
|
package/dist/molecules/toast.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Portal, normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
-
import { connect, createStore, group as toast_group, machine } from "@zag-js/toast";
|
|
4
3
|
import { useId } from "react";
|
|
5
4
|
import { ActionIcon } from "../atoms/action-icon.js";
|
|
6
5
|
import { tv } from "../utils.js";
|
|
6
|
+
import * as __rspack_external__zag_js_toast_856c971b from "@zag-js/toast";
|
|
7
7
|
const toastVariants = tv({
|
|
8
8
|
slots: {
|
|
9
9
|
root: [
|
|
@@ -51,8 +51,8 @@ function Toast({ actor, index, parent, placement }) {
|
|
|
51
51
|
parent,
|
|
52
52
|
placement
|
|
53
53
|
};
|
|
54
|
-
const service = useMachine(machine, composedProps);
|
|
55
|
-
const api = connect(service, normalizeProps);
|
|
54
|
+
const service = useMachine(__rspack_external__zag_js_toast_856c971b.machine, composedProps);
|
|
55
|
+
const api = __rspack_external__zag_js_toast_856c971b.connect(service, normalizeProps);
|
|
56
56
|
const { root, header, icon, title, description, closeButton } = toastVariants();
|
|
57
57
|
return /*#__PURE__*/ jsxs("div", {
|
|
58
58
|
className: root(),
|
|
@@ -96,17 +96,17 @@ function Toast({ actor, index, parent, placement }) {
|
|
|
96
96
|
]
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
const toaster = createStore({
|
|
99
|
+
const toaster = __rspack_external__zag_js_toast_856c971b.createStore({
|
|
100
100
|
placement: "bottom-end",
|
|
101
101
|
gap: 16,
|
|
102
102
|
offsets: "24px"
|
|
103
103
|
});
|
|
104
104
|
function Toaster() {
|
|
105
|
-
const service = useMachine(
|
|
105
|
+
const service = useMachine(__rspack_external__zag_js_toast_856c971b.group.machine, {
|
|
106
106
|
id: useId(),
|
|
107
107
|
store: toaster
|
|
108
108
|
});
|
|
109
|
-
const api =
|
|
109
|
+
const api = __rspack_external__zag_js_toast_856c971b.group.connect(service, normalizeProps);
|
|
110
110
|
const { group } = toastVariants();
|
|
111
111
|
return /*#__PURE__*/ jsx(Portal, {
|
|
112
112
|
children: /*#__PURE__*/ jsx("div", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
3
|
-
import { collection as tree_view_collection, connect, machine } from "@zag-js/tree-view";
|
|
4
3
|
import { createContext, useContext, useId } from "react";
|
|
5
4
|
import { Icon } from "../atoms/icon.js";
|
|
6
5
|
import { tv } from "../utils.js";
|
|
6
|
+
import * as __rspack_external__zag_js_tree_view_6365b65d from "@zag-js/tree-view";
|
|
7
7
|
const treeViewVariants = tv({
|
|
8
8
|
slots: {
|
|
9
9
|
root: "relative rounded-tree-view bg-tree-view-root-bg",
|
|
@@ -137,7 +137,7 @@ function useTreeViewNodeContext() {
|
|
|
137
137
|
function TreeView({ id, data, size, selectionBehavior = "all", dir = "ltr", selectionMode = "single", expandedValue, selectedValue, focusedValue, defaultExpandedValue, defaultSelectedValue, expandOnClick = true, typeahead = true, onExpandedChange, onSelectionChange, onFocusChange, children, className, ...props }) {
|
|
138
138
|
const generatedId = useId();
|
|
139
139
|
const uniqueId = id || generatedId;
|
|
140
|
-
const collection =
|
|
140
|
+
const collection = __rspack_external__zag_js_tree_view_6365b65d.collection({
|
|
141
141
|
nodeToValue: (node)=>node.id,
|
|
142
142
|
nodeToString: (node)=>node.name,
|
|
143
143
|
rootNode: {
|
|
@@ -146,7 +146,7 @@ function TreeView({ id, data, size, selectionBehavior = "all", dir = "ltr", sele
|
|
|
146
146
|
children: data
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
|
-
const service = useMachine(machine, {
|
|
149
|
+
const service = useMachine(__rspack_external__zag_js_tree_view_6365b65d.machine, {
|
|
150
150
|
id: uniqueId,
|
|
151
151
|
collection,
|
|
152
152
|
dir,
|
|
@@ -162,7 +162,7 @@ function TreeView({ id, data, size, selectionBehavior = "all", dir = "ltr", sele
|
|
|
162
162
|
onSelectionChange,
|
|
163
163
|
onFocusChange
|
|
164
164
|
});
|
|
165
|
-
const api = connect(service, normalizeProps);
|
|
165
|
+
const api = __rspack_external__zag_js_tree_view_6365b65d.connect(service, normalizeProps);
|
|
166
166
|
const styles = treeViewVariants({
|
|
167
167
|
size
|
|
168
168
|
});
|
|
@@ -428,7 +428,7 @@ function checkReachEnd(distance, reachEndThreshold, reachedEndRef, onReachEnd) {
|
|
|
428
428
|
}
|
|
429
429
|
} else reachedEndRef.current = false;
|
|
430
430
|
}
|
|
431
|
-
const useIsomorphicLayoutEffect = "
|
|
431
|
+
const useIsomorphicLayoutEffect = "u" < typeof window ? useEffect : useLayoutEffect;
|
|
432
432
|
function clampSelection(selectedIds, previous, max) {
|
|
433
433
|
return [
|
|
434
434
|
...selectedIds.filter((id)=>previous[id]),
|
|
@@ -818,7 +818,7 @@ function DataTable(props) {
|
|
|
818
818
|
const hasWarnedAboutUnboundedVirtualization = useRef(false);
|
|
819
819
|
const hasWarnedAboutVirtualizedCellSpan = useRef(false);
|
|
820
820
|
useEffect(()=>{
|
|
821
|
-
if (!(virtualizationUsable && getCellSpan) || hasWarnedAboutVirtualizedCellSpan.current || "
|
|
821
|
+
if (!(virtualizationUsable && getCellSpan) || hasWarnedAboutVirtualizedCellSpan.current || "u" < typeof process || process.env?.NODE_ENV === "production") return;
|
|
822
822
|
hasWarnedAboutVirtualizedCellSpan.current = true;
|
|
823
823
|
console.warn("DataTable: getCellSpan and enableVirtualization are both set. rowSpan/colSpan require the merged rows to be adjacent DOM siblings, which virtualization's windowing does not guarantee — a spanning cell's owner row can scroll out of view while a `hidden: true` follower row stays rendered, leaving a gap.");
|
|
824
824
|
}, [
|
|
@@ -827,7 +827,7 @@ function DataTable(props) {
|
|
|
827
827
|
]);
|
|
828
828
|
const hasWarnedAboutVirtualizedRowReorder = useRef(false);
|
|
829
829
|
useEffect(()=>{
|
|
830
|
-
if (!(virtualizationUsable && enableRowReorder) || hasWarnedAboutVirtualizedRowReorder.current || "
|
|
830
|
+
if (!(virtualizationUsable && enableRowReorder) || hasWarnedAboutVirtualizedRowReorder.current || "u" < typeof process || process.env?.NODE_ENV === "production") return;
|
|
831
831
|
hasWarnedAboutVirtualizedRowReorder.current = true;
|
|
832
832
|
console.warn("DataTable: enableRowReorder and enableVirtualization are both set. Dragging a row toward a target outside the currently rendered window is unreliable — dnd-kit only tracks rows that are actually mounted, not the full row list.");
|
|
833
833
|
}, [
|
|
@@ -839,7 +839,7 @@ function DataTable(props) {
|
|
|
839
839
|
hasWarnedAboutUnboundedVirtualization.current = false;
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
|
-
if (hasWarnedAboutUnboundedVirtualization.current || "
|
|
842
|
+
if (hasWarnedAboutUnboundedVirtualization.current || "u" < typeof process || process.env?.NODE_ENV === "production") return;
|
|
843
843
|
hasWarnedAboutUnboundedVirtualization.current = true;
|
|
844
844
|
console.warn("DataTable: enableVirtualization has no effect without maxHeight — the scroll container never gets a bounded height to measure scrollTop against, so only the first batch of rows would render. Pass maxHeight to enable virtualization.");
|
|
845
845
|
}, [
|
|
@@ -967,7 +967,7 @@ function DataTable(props) {
|
|
|
967
967
|
const hasWarnedAboutPinnedActionsOverlap = useRef(false);
|
|
968
968
|
useEffect(()=>{
|
|
969
969
|
const endPinned = enableColumnPinning && table.getAllLeafColumns().some((c)=>"end" === c.getIsPinned());
|
|
970
|
-
if (!(endPinned && stickyActions && hasActionsColumn) || hasWarnedAboutPinnedActionsOverlap.current || "
|
|
970
|
+
if (!(endPinned && stickyActions && hasActionsColumn) || hasWarnedAboutPinnedActionsOverlap.current || "u" < typeof process || process.env?.NODE_ENV === "production") return;
|
|
971
971
|
hasWarnedAboutPinnedActionsOverlap.current = true;
|
|
972
972
|
console.warn("DataTable: a column pinned to 'end' and the sticky actions cell both freeze at the trailing edge, so they overlap — the actions column is not part of the column model, so end-pinned offsets cannot account for its width. Use stickyActions={false}, or pin to 'start' instead.");
|
|
973
973
|
}, [
|
|
@@ -979,7 +979,7 @@ function DataTable(props) {
|
|
|
979
979
|
const hasWarnedAboutPinnedStringWidth = useRef(false);
|
|
980
980
|
useEffect(()=>{
|
|
981
981
|
const offender = enableColumnPinning && table.getAllLeafColumns().find((c)=>c.getIsPinned() && "string" == typeof c.columnDef.meta?.width);
|
|
982
|
-
if (!offender || hasWarnedAboutPinnedStringWidth.current || "
|
|
982
|
+
if (!offender || hasWarnedAboutPinnedStringWidth.current || "u" < typeof process || process.env?.NODE_ENV === "production") return;
|
|
983
983
|
hasWarnedAboutPinnedStringWidth.current = true;
|
|
984
984
|
console.warn(`DataTable: pinned column "${offender.id}" declares a string meta.width, which cannot be mirrored into TanStack's numeric \`size\`. Frozen offsets are computed from \`size\`, so this column will be positioned as if it were the default width and overlap its neighbours. Give pinned columns a numeric meta.width.`);
|
|
985
985
|
}, [
|
|
@@ -1627,7 +1627,7 @@ DataTable.ToolbarActions = function() {
|
|
|
1627
1627
|
hasWarnedAboutToolbarOverflow.current = false;
|
|
1628
1628
|
return;
|
|
1629
1629
|
}
|
|
1630
|
-
if (hasWarnedAboutToolbarOverflow.current || "
|
|
1630
|
+
if (hasWarnedAboutToolbarOverflow.current || "u" < typeof process || process.env?.NODE_ENV === "production") return;
|
|
1631
1631
|
hasWarnedAboutToolbarOverflow.current = true;
|
|
1632
1632
|
console.warn(`[DataTable] toolbarActions has ${count} actions; at most ${DATA_TABLE_MAX_TOOLBAR_ACTIONS} is recommended. They still render, but the toolbar gets crowded — consider moving the extras into a menu.`);
|
|
1633
1633
|
}, [
|