@dreamtree-org/twreact-ui 2.0.5 → 2.0.6
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 +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/components/core/Popover.d.ts.map +1 -1
- package/dist/components/feedback/Tour.d.ts.map +1 -1
- package/dist/esm/components/charts/ChartFrame.js +1 -1
- package/dist/esm/components/core/Accordion.js +2 -2
- package/dist/esm/components/core/DatePicker.js +3 -3
- package/dist/esm/components/core/DateRangePicker.js +3 -3
- package/dist/esm/components/core/Form.js +3 -3
- package/dist/esm/components/core/LocationPicker.js +1 -1
- package/dist/esm/components/core/Popover.js +1 -1
- package/dist/esm/components/core/Select.js +16 -16
- package/dist/esm/components/core/Table/Table.js +1 -1
- package/dist/esm/components/core/internal/Calendar.js +2 -2
- package/dist/esm/components/feedback/Drawer.js +5 -5
- package/dist/esm/components/feedback/Tour.js +1 -1
- package/dist/esm/components/rich-text/RichTextEditor.js +2 -2
- package/dist/esm/components/rich-text/RichTextToolbar.js +1 -1
- package/dist/esm/components/utility/Pagination.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +39 -39
- package/dist/index.js +39 -39
- package/dist/rich-text/index.js +3 -3
- package/mcp/catalog.snapshot.json +24 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7539,7 +7539,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7539
7539
|
className: "flex flex-wrap gap-1",
|
|
7540
7540
|
children: selectedOptions.map(function (opt) {
|
|
7541
7541
|
return jsxRuntime.jsxs("div", {
|
|
7542
|
-
className: "flex items-center gap-1 rounded-full bg-
|
|
7542
|
+
className: "flex items-center gap-1 rounded-full bg-line/60 px-2 py-0.5 text-xs",
|
|
7543
7543
|
children: [jsxRuntime.jsx("span", {
|
|
7544
7544
|
className: "truncate max-w-[8rem]",
|
|
7545
7545
|
children: opt.label
|
|
@@ -7568,7 +7568,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7568
7568
|
className: "flex flex-wrap gap-1",
|
|
7569
7569
|
children: selectedOptions.slice(0, maxTagCount).map(function (opt) {
|
|
7570
7570
|
return jsxRuntime.jsx("div", {
|
|
7571
|
-
className: "flex items-center gap-1 rounded-full bg-
|
|
7571
|
+
className: "flex items-center gap-1 rounded-full bg-line/60 px-2 py-0.5 text-xs",
|
|
7572
7572
|
children: jsxRuntime.jsx("span", {
|
|
7573
7573
|
className: "truncate max-w-[6rem]",
|
|
7574
7574
|
children: opt.label
|
|
@@ -7606,7 +7606,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7606
7606
|
"aria-expanded": !collapsed,
|
|
7607
7607
|
"aria-controls": collapsed ? undefined : groupOptionsId,
|
|
7608
7608
|
"aria-label": "".concat(collapsed ? "Expand" : "Collapse", " ").concat(groupName),
|
|
7609
|
-
className: "text-xs border border-
|
|
7609
|
+
className: "text-xs border border-line p-0.5 rounded-md cursor-pointer hover:bg-line/50 focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
7610
7610
|
onClick: function onClick() {
|
|
7611
7611
|
return setCollapsedGroups(function (prev) {
|
|
7612
7612
|
return _objectSpread$17(_objectSpread$17({}, prev), {}, _defineProperty$4({}, group.label, !prev[group.label]));
|
|
@@ -7633,16 +7633,16 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7633
7633
|
onClick: function onClick() {
|
|
7634
7634
|
return handleSelect(option);
|
|
7635
7635
|
},
|
|
7636
|
-
className: cn("flex items-center hover:bg-
|
|
7636
|
+
className: cn("flex items-center hover:bg-line/50 cursor-pointer", rowClass, {
|
|
7637
7637
|
"opacity-50 cursor-not-allowed": option.disabled,
|
|
7638
|
-
"bg-primary-50 text-primary-600": focusedIndex === index
|
|
7638
|
+
"bg-primary-50 text-primary-600 dark:bg-primary-900/40 dark:text-primary-300": focusedIndex === index
|
|
7639
7639
|
}),
|
|
7640
7640
|
children: [multiSelect && jsxRuntime.jsx("div", {
|
|
7641
7641
|
className: "mr-2",
|
|
7642
7642
|
children: selectedValues.includes(option.value) ? jsxRuntime.jsx(Check, {
|
|
7643
7643
|
className: "h-4 w-4 text-primary-600"
|
|
7644
7644
|
}) : jsxRuntime.jsx("div", {
|
|
7645
|
-
className: "h-4 w-4 rounded border border-gray-300"
|
|
7645
|
+
className: "h-4 w-4 rounded border border-gray-300 dark:border-gray-600"
|
|
7646
7646
|
})
|
|
7647
7647
|
}), onMenuItemRender ? onMenuItemRender(option) : highlight(option.label, searchTerm), !multiSelect && selectedValues === option.value && jsxRuntime.jsx(Check, {
|
|
7648
7648
|
className: "ml-auto h-4 w-4 text-primary-600"
|
|
@@ -7671,17 +7671,17 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7671
7671
|
onClick: function onClick() {
|
|
7672
7672
|
return handleSelect(option);
|
|
7673
7673
|
},
|
|
7674
|
-
className: cn("flex items-center hover:bg-
|
|
7674
|
+
className: cn("flex items-center hover:bg-line/50 cursor-pointer", ROW_CLASSES$1[isSheet ? "sheet" : "popover"], {
|
|
7675
7675
|
"opacity-50 cursor-not-allowed": option.disabled,
|
|
7676
|
-
"bg-primary-50 text-primary-600": focusedIndex === index,
|
|
7677
|
-
"bg-primary-100": multiSelect && selectedValues.includes(option.value)
|
|
7676
|
+
"bg-primary-50 text-primary-600 dark:bg-primary-900/40 dark:text-primary-300": focusedIndex === index,
|
|
7677
|
+
"bg-primary-100 dark:bg-primary-900/60": multiSelect && selectedValues.includes(option.value)
|
|
7678
7678
|
}),
|
|
7679
7679
|
children: [multiSelect && jsxRuntime.jsx("div", {
|
|
7680
7680
|
className: "mr-2",
|
|
7681
7681
|
children: selectedValues.includes(option.value) ? jsxRuntime.jsx(Check, {
|
|
7682
7682
|
className: "h-4 w-4 text-primary-600"
|
|
7683
7683
|
}) : jsxRuntime.jsx("div", {
|
|
7684
|
-
className: "h-4 w-4 rounded border border-gray-300"
|
|
7684
|
+
className: "h-4 w-4 rounded border border-gray-300 dark:border-gray-600"
|
|
7685
7685
|
})
|
|
7686
7686
|
}), onMenuItemRender ? onMenuItemRender(option) : highlight(option.label, searchTerm), !multiSelect && selectedValues === option.value && jsxRuntime.jsx(Check, {
|
|
7687
7687
|
className: "ml-auto h-4 w-4 text-primary-600"
|
|
@@ -7693,7 +7693,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7693
7693
|
children: jsxRuntime.jsxs("button", {
|
|
7694
7694
|
type: "button",
|
|
7695
7695
|
onClick: handleCreate,
|
|
7696
|
-
className: "flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-
|
|
7696
|
+
className: "flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-line/50 focus:outline-none focus:bg-line/50",
|
|
7697
7697
|
children: [jsxRuntime.jsx(Plus, {
|
|
7698
7698
|
className: "h-4 w-4",
|
|
7699
7699
|
"aria-hidden": "true"
|
|
@@ -7721,7 +7721,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7721
7721
|
className: "h-4 w-4 text-primary-600",
|
|
7722
7722
|
"aria-hidden": "true"
|
|
7723
7723
|
}) : jsxRuntime.jsx("div", {
|
|
7724
|
-
className: "h-4 w-4 rounded border border-gray-300"
|
|
7724
|
+
className: "h-4 w-4 rounded border border-gray-300 dark:border-gray-600"
|
|
7725
7725
|
})
|
|
7726
7726
|
});
|
|
7727
7727
|
}()
|
|
@@ -7786,7 +7786,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7786
7786
|
"aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
|
|
7787
7787
|
"aria-describedby": describedBy,
|
|
7788
7788
|
"aria-invalid": error ? true : undefined,
|
|
7789
|
-
className: cn("flex w-full items-center justify-between rounded-md border border-
|
|
7789
|
+
className: cn("flex w-full items-center justify-between rounded-md border border-line bg-surface text-foreground focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", SIZE_CLASSES$3[size] || SIZE_CLASSES$3.md, {
|
|
7790
7790
|
"border-error-500 focus:ring-error-500": error,
|
|
7791
7791
|
// Empty: the placeholder reads muted, like Input's
|
|
7792
7792
|
// ::placeholder (#159). `className` still merges last.
|
|
@@ -7822,7 +7822,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7822
7822
|
type: "button",
|
|
7823
7823
|
onClick: handleClear,
|
|
7824
7824
|
"aria-label": "Clear selection",
|
|
7825
|
-
className: cn("absolute right-8 top-1/2 -translate-y-1/2 inline-flex items-center justify-center rounded p-1 text-primary-500 hover:bg-
|
|
7825
|
+
className: cn("absolute right-8 top-1/2 -translate-y-1/2 inline-flex items-center justify-center rounded p-1 text-primary-500 hover:bg-line/50 focus:outline-none focus:ring-2 focus:ring-primary-500", TOUCH_TARGET),
|
|
7826
7826
|
children: jsxRuntime.jsx(X, {
|
|
7827
7827
|
className: "h-4 w-4",
|
|
7828
7828
|
"aria-hidden": "true"
|
|
@@ -7845,7 +7845,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7845
7845
|
value: selectedValues !== null && selectedValues !== void 0 ? selectedValues : ""
|
|
7846
7846
|
})), isOpen && !isSheet && typeof document !== "undefined" && /*#__PURE__*/ReactDOM.createPortal(jsxRuntime.jsxs("div", {
|
|
7847
7847
|
ref: popoverRef,
|
|
7848
|
-
className: "fixed z-popover overflow-auto rounded-md border border-
|
|
7848
|
+
className: "fixed z-popover overflow-auto rounded-md border border-line bg-surface text-foreground shadow-lg",
|
|
7849
7849
|
role: "dialog",
|
|
7850
7850
|
"data-placement": floatingPlacement.split("-")[0],
|
|
7851
7851
|
// Portaled to document.body with position:fixed so the menu
|
|
@@ -7857,7 +7857,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7857
7857
|
opacity: 0
|
|
7858
7858
|
}),
|
|
7859
7859
|
children: [searchable && jsxRuntime.jsx("div", {
|
|
7860
|
-
className: "border-b border-
|
|
7860
|
+
className: "border-b border-line p-2",
|
|
7861
7861
|
children: renderSearch()
|
|
7862
7862
|
}), renderListbox()]
|
|
7863
7863
|
}), document.body)]
|
|
@@ -11892,7 +11892,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
11892
11892
|
type: "button",
|
|
11893
11893
|
"aria-label": "Reload",
|
|
11894
11894
|
title: "Reload",
|
|
11895
|
-
className: "px-4 py-2 bg-primary-100 flex items-center gap-2 rounded-lg md:rounded text-primary-700 hover:bg-primary-200 transition-colors",
|
|
11895
|
+
className: "px-4 py-2 bg-primary-100 flex items-center gap-2 rounded-lg md:rounded text-primary-700 hover:bg-primary-200 transition-colors dark:bg-primary-900/40 dark:text-primary-300 dark:hover:bg-primary-900/60",
|
|
11896
11896
|
onClick: onReload,
|
|
11897
11897
|
children: [jsxRuntime.jsx(RefreshCcw, {
|
|
11898
11898
|
className: "size-4",
|
|
@@ -17961,8 +17961,8 @@ function Calendar(_ref3) {
|
|
|
17961
17961
|
className: cn("mx-auto rounded-md text-sm transition-colors motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-1", sheet ? "h-11 w-full min-w-0 text-base" : "h-9 w-full max-w-9", {
|
|
17962
17962
|
"text-primary-400": !currentMonth,
|
|
17963
17963
|
"bg-primary-600 text-primary-50": state.edge,
|
|
17964
|
-
"bg-primary-200": state.inRange && !state.edge,
|
|
17965
|
-
"bg-primary-100 text-primary-600": todayDate && !state.edge && !state.inRange,
|
|
17964
|
+
"bg-primary-200 dark:bg-primary-900/60": state.inRange && !state.edge,
|
|
17965
|
+
"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-300": todayDate && !state.edge && !state.inRange,
|
|
17966
17966
|
"hover:bg-background": currentMonth && !state.edge && !state.inRange && !disabled,
|
|
17967
17967
|
"cursor-not-allowed opacity-50": disabled
|
|
17968
17968
|
}),
|
|
@@ -18184,7 +18184,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
18184
18184
|
edge: isSel
|
|
18185
18185
|
};
|
|
18186
18186
|
};
|
|
18187
|
-
var actionClass = isSheet ? "rounded-md px-3 py-2 text-sm hover:bg-
|
|
18187
|
+
var actionClass = isSheet ? "rounded-md px-3 py-2 text-sm hover:bg-line/50" : "rounded-md px-2 py-1 text-xs hover:bg-line/50";
|
|
18188
18188
|
var actions = jsxRuntime.jsxs("div", {
|
|
18189
18189
|
className: "flex gap-2",
|
|
18190
18190
|
children: [showClear && jsxRuntime.jsx("button", {
|
|
@@ -18235,7 +18235,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
18235
18235
|
"aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
|
|
18236
18236
|
"aria-describedby": error ? errorId : helperText ? helperId : undefined,
|
|
18237
18237
|
"aria-invalid": error ? true : undefined,
|
|
18238
|
-
className: cn("flex w-full items-center justify-between rounded-md border border-
|
|
18238
|
+
className: cn("flex w-full items-center justify-between rounded-md border border-line bg-surface text-foreground px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", {
|
|
18239
18239
|
"border-error-500 focus:ring-error-500": error,
|
|
18240
18240
|
// Empty: the placeholder reads muted, like Input's
|
|
18241
18241
|
// ::placeholder (#159). `className` still merges last.
|
|
@@ -18271,7 +18271,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
18271
18271
|
// this button unmounts once the value clears
|
|
18272
18272
|
(_triggerRef$current3 = triggerRef.current) === null || _triggerRef$current3 === void 0 || _triggerRef$current3.focus();
|
|
18273
18273
|
},
|
|
18274
|
-
className: "absolute right-9 top-1/2 inline-flex -translate-y-1/2 items-center justify-center rounded-md p-1 text-primary-400 hover:bg-
|
|
18274
|
+
className: "absolute right-9 top-1/2 inline-flex -translate-y-1/2 items-center justify-center rounded-md p-1 text-primary-400 hover:bg-line/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-50",
|
|
18275
18275
|
children: jsxRuntime.jsx(X, {
|
|
18276
18276
|
className: "h-4 w-4",
|
|
18277
18277
|
"aria-hidden": "true"
|
|
@@ -19418,7 +19418,7 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(_ref2, ref) {
|
|
|
19418
19418
|
id: fieldId,
|
|
19419
19419
|
"aria-invalid": error ? true : undefined,
|
|
19420
19420
|
"aria-describedby": describedBy,
|
|
19421
|
-
className: cn("flex w-full rounded-md border border-
|
|
19421
|
+
className: cn("flex w-full rounded-md border border-line bg-surface text-foreground px-3 py-2 text-sm placeholder:text-primary-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", {
|
|
19422
19422
|
"border-error-500 focus:ring-error-500": error
|
|
19423
19423
|
}),
|
|
19424
19424
|
placeholder: placeholder,
|
|
@@ -19457,7 +19457,7 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(_ref2, ref) {
|
|
|
19457
19457
|
},
|
|
19458
19458
|
"aria-invalid": error ? true : undefined,
|
|
19459
19459
|
"aria-describedby": describedBy,
|
|
19460
|
-
className: "rounded border-gray-300 text-primary-600 focus:ring-primary-500"
|
|
19460
|
+
className: "rounded border-gray-300 text-primary-600 focus:ring-primary-500 dark:border-gray-600"
|
|
19461
19461
|
}), label && jsxRuntime.jsxs("label", {
|
|
19462
19462
|
htmlFor: fieldId,
|
|
19463
19463
|
className: "ml-2 text-sm",
|
|
@@ -19554,7 +19554,7 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(_ref2, ref) {
|
|
|
19554
19554
|
className: "mt-1 flex items-center",
|
|
19555
19555
|
children: [jsxRuntime.jsxs("label", {
|
|
19556
19556
|
htmlFor: name,
|
|
19557
|
-
className: cn("cursor-pointer inline-flex items-center px-4 py-2 border border-
|
|
19557
|
+
className: cn("cursor-pointer inline-flex items-center px-4 py-2 border border-line rounded-md shadow-sm text-sm font-medium bg-surface text-foreground hover:bg-background focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500", {
|
|
19558
19558
|
"border-error-500": error
|
|
19559
19559
|
}),
|
|
19560
19560
|
children: [jsxRuntime.jsx("svg", {
|
|
@@ -19924,7 +19924,7 @@ var Accordion = /*#__PURE__*/React.forwardRef(function Accordion(_ref, ref) {
|
|
|
19924
19924
|
lg: "rounded-lg",
|
|
19925
19925
|
xl: "rounded-xl"
|
|
19926
19926
|
};
|
|
19927
|
-
var wrapperClasses = cn(bordered ? "bg-
|
|
19927
|
+
var wrapperClasses = cn(bordered ? "bg-surface text-foreground" : "bg-transparent", bordered ? "divide-y divide-line" : "", roundedMap[rounded] || roundedMap.md, "shadow-sm", className);
|
|
19928
19928
|
var renderLeftIcon = function renderLeftIcon(item, index) {
|
|
19929
19929
|
var left = item === null || item === void 0 ? void 0 : item.leftIcon;
|
|
19930
19930
|
if (!left) return null;
|
|
@@ -19952,7 +19952,7 @@ var Accordion = /*#__PURE__*/React.forwardRef(function Accordion(_ref, ref) {
|
|
|
19952
19952
|
var panelId = "".concat(uid, "accordion-panel-").concat(id);
|
|
19953
19953
|
var leftIconEl = renderLeftIcon(item, index);
|
|
19954
19954
|
return jsxRuntime.jsxs("div", {
|
|
19955
|
-
className: "bg-
|
|
19955
|
+
className: "bg-surface text-foreground",
|
|
19956
19956
|
children: [jsxRuntime.jsx("h3", {
|
|
19957
19957
|
children: jsxRuntime.jsx("button", {
|
|
19958
19958
|
ref: function ref(el) {
|
|
@@ -20526,12 +20526,12 @@ var DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangePicker(_re
|
|
|
20526
20526
|
onClick: function onClick() {
|
|
20527
20527
|
return applyPreset(preset);
|
|
20528
20528
|
},
|
|
20529
|
-
className: cn("shrink-0 rounded-full border px-3 text-xs font-medium transition-colors motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", isSheet ? "min-h-11 text-sm" : "py-1", active ? "border-primary-600 bg-primary-600 text-white" : "border-
|
|
20529
|
+
className: cn("shrink-0 rounded-full border px-3 text-xs font-medium transition-colors motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", isSheet ? "min-h-11 text-sm" : "py-1", active ? "border-primary-600 bg-primary-600 text-white" : "border-line hover:bg-line/50"),
|
|
20530
20530
|
children: preset.label
|
|
20531
20531
|
}, preset.label);
|
|
20532
20532
|
})
|
|
20533
20533
|
}) : null;
|
|
20534
|
-
var actionClass = isSheet ? "rounded-md px-3 py-2 text-sm hover:bg-
|
|
20534
|
+
var actionClass = isSheet ? "rounded-md px-3 py-2 text-sm hover:bg-line/50" : "rounded-md px-2 py-1 text-xs hover:bg-line/50";
|
|
20535
20535
|
var calendar = jsxRuntime.jsx(Calendar, {
|
|
20536
20536
|
month: currentMonth,
|
|
20537
20537
|
onMonthChange: setCurrentMonth,
|
|
@@ -20586,7 +20586,7 @@ var DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangePicker(_re
|
|
|
20586
20586
|
"aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
|
|
20587
20587
|
"aria-describedby": error ? errorId : helperText ? helperId : undefined,
|
|
20588
20588
|
"aria-invalid": error ? true : undefined,
|
|
20589
|
-
className: cn("flex w-full items-center justify-between rounded-md border border-
|
|
20589
|
+
className: cn("flex w-full items-center justify-between rounded-md border border-line bg-surface text-foreground px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", {
|
|
20590
20590
|
"border-error-500 focus:ring-error-500": error,
|
|
20591
20591
|
// Empty: the placeholder reads muted, like Input's
|
|
20592
20592
|
// ::placeholder (#159). `className` still merges last.
|
|
@@ -24304,7 +24304,7 @@ var LocationPicker = /*#__PURE__*/React.forwardRef(function LocationPicker(_ref,
|
|
|
24304
24304
|
}, inputProps), {}, {
|
|
24305
24305
|
value: text,
|
|
24306
24306
|
onChange: handleInputChange,
|
|
24307
|
-
className: cn("rounded-md border border-
|
|
24307
|
+
className: cn("rounded-md border border-line bg-surface py-2 px-3 text-sm text-foreground placeholder-gray-400 shadow-sm focus:border-primary-500 focus:ring-1 focus:ring-primary-500", "dark:placeholder-gray-500", "[@media(pointer:coarse)]:text-base", fullWidth ? "w-full" : "min-w-[200px]", status === "error" && "border-error-500 dark:border-error-400", inputProps.className, inputPaddingClass)
|
|
24308
24308
|
})), jsxRuntime.jsx("div", {
|
|
24309
24309
|
className: cn("absolute inset-y-0 flex items-center", iconPosition === "right" ? "right-2" : "left-2"),
|
|
24310
24310
|
children: iconButton
|
|
@@ -25017,7 +25017,7 @@ var Popover = /*#__PURE__*/React.forwardRef(function (_ref, _ref2) {
|
|
|
25017
25017
|
onKeyDown: handlePanelKeyDown,
|
|
25018
25018
|
"data-side": resolvedPlacement.split("-")[0],
|
|
25019
25019
|
"data-presentation": "popover",
|
|
25020
|
-
className: cn("z-popover min-w-[12rem] max-w-sm rounded-lg border border-
|
|
25020
|
+
className: cn("z-popover min-w-[12rem] max-w-sm rounded-lg border border-line bg-surface p-4 text-sm text-foreground shadow-lg focus:outline-none", "animate-fade-in motion-reduce:animate-none", className),
|
|
25021
25021
|
style: _objectSpread$E(_objectSpread$E({}, floatingStyles), style)
|
|
25022
25022
|
}, props), {}, {
|
|
25023
25023
|
children: [title && jsxRuntime.jsx("h2", {
|
|
@@ -28195,7 +28195,7 @@ var DrawerTitleBar = function DrawerTitleBar(_ref2) {
|
|
|
28195
28195
|
dragProps = _useGrabZone.dragProps,
|
|
28196
28196
|
grabClass = _useGrabZone.grabClass;
|
|
28197
28197
|
return jsxRuntime.jsx("div", _objectSpread$q(_objectSpread$q({}, dragProps), {}, {
|
|
28198
|
-
className: cn("flex shrink-0 items-start justify-between gap-4 border-b border-
|
|
28198
|
+
className: cn("flex shrink-0 items-start justify-between gap-4 border-b border-line px-6 py-4", grabClass, className),
|
|
28199
28199
|
children: children
|
|
28200
28200
|
}));
|
|
28201
28201
|
};
|
|
@@ -28270,7 +28270,7 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
28270
28270
|
idPrefix: "drawer",
|
|
28271
28271
|
testIdPrefix: "drawer",
|
|
28272
28272
|
handleBarClassName: "bg-gray-300 dark:bg-gray-600",
|
|
28273
|
-
panelClassName: cn("border-
|
|
28273
|
+
panelClassName: cn("border-line bg-surface text-foreground", PLACEMENT_CLASSES[side], sizes[size] || sizes.md),
|
|
28274
28274
|
renderHeader: renderHeader
|
|
28275
28275
|
}, props), {}, {
|
|
28276
28276
|
children: composed ? children : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -28278,7 +28278,7 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
28278
28278
|
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-6 py-4",
|
|
28279
28279
|
children: children
|
|
28280
28280
|
}), footer && jsxRuntime.jsx("div", {
|
|
28281
|
-
className: "flex shrink-0 items-center justify-end gap-3 border-t border-
|
|
28281
|
+
className: "flex shrink-0 items-center justify-end gap-3 border-t border-line px-6 py-4",
|
|
28282
28282
|
children: footer
|
|
28283
28283
|
})]
|
|
28284
28284
|
})
|
|
@@ -28294,7 +28294,7 @@ var DrawerHeader = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
28294
28294
|
return jsxRuntime.jsx("div", _objectSpread$q(_objectSpread$q(_objectSpread$q({
|
|
28295
28295
|
ref: ref
|
|
28296
28296
|
}, props), dragProps), {}, {
|
|
28297
|
-
className: cn("border-b border-
|
|
28297
|
+
className: cn("border-b border-line px-6 py-4", grabClass, className)
|
|
28298
28298
|
}));
|
|
28299
28299
|
});
|
|
28300
28300
|
var DrawerBody = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
|
|
@@ -28310,7 +28310,7 @@ var DrawerFooter = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
28310
28310
|
props = _objectWithoutProperties$1(_ref7, _excluded4$1);
|
|
28311
28311
|
return jsxRuntime.jsx("div", _objectSpread$q({
|
|
28312
28312
|
ref: ref,
|
|
28313
|
-
className: cn("flex items-center justify-end gap-3 border-t border-
|
|
28313
|
+
className: cn("flex items-center justify-end gap-3 border-t border-line px-6 py-4", className)
|
|
28314
28314
|
}, props));
|
|
28315
28315
|
});
|
|
28316
28316
|
DrawerHeader.displayName = "Drawer.Header";
|
|
@@ -28727,7 +28727,7 @@ var Tour = /*#__PURE__*/React.forwardRef(function (_ref, _ref2) {
|
|
|
28727
28727
|
onKeyDown: handleKeyDown,
|
|
28728
28728
|
"data-placement": placementAttr,
|
|
28729
28729
|
"data-presentation": docked ? "sheet" : "popover",
|
|
28730
|
-
className: cn("fixed overflow-y-auto overscroll-contain rounded-lg border border-
|
|
28730
|
+
className: cn("fixed overflow-y-auto overscroll-contain rounded-lg border border-line bg-surface text-foreground shadow-xl focus:outline-none", "transition-opacity duration-200 motion-reduce:transition-none", docked ? "inset-x-4 bottom-4 max-h-[60dvh] pb-safe touch-pan-y" : "w-[min(22rem,calc(100vw-2rem))] max-h-[calc(100dvh-2rem)]", !docked && !rect && "left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2", ready ? "opacity-100" : "pointer-events-none opacity-0", className),
|
|
28731
28731
|
style: anchored ? _objectSpread$o(_objectSpread$o({}, floatingStyles), style) : style
|
|
28732
28732
|
}, swipeHandlers), rest), {}, {
|
|
28733
28733
|
children: [jsxRuntime.jsxs("div", {
|
|
@@ -29015,7 +29015,7 @@ function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
29015
29015
|
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29016
29016
|
// Shared button chrome: dark-safe surface, focus-visible ring, 44px target on coarse pointers.
|
|
29017
29017
|
var BUTTON_BASE = cn('inline-flex items-center justify-center rounded-md border px-3 py-2 text-sm font-medium', 'transition-colors duration-fast motion-reduce:transition-none', 'outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900', TOUCH_TARGET);
|
|
29018
|
-
var BUTTON_IDLE = 'border-
|
|
29018
|
+
var BUTTON_IDLE = 'border-line bg-surface text-foreground hover:bg-background dark:hover:bg-gray-800';
|
|
29019
29019
|
var BUTTON_ACTIVE = 'border-primary-500 bg-primary-50 text-primary-600 dark:bg-primary-950 dark:text-primary-300';
|
|
29020
29020
|
var DISABLED = 'disabled:opacity-50 disabled:cursor-not-allowed';
|
|
29021
29021
|
var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
package/dist/rich-text/index.js
CHANGED
|
@@ -291,7 +291,7 @@ function LinkForm(_ref) {
|
|
|
291
291
|
close();
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
|
-
className: cn.cn("h-8 min-w-0 flex-1 rounded-md border bg-
|
|
294
|
+
className: cn.cn("h-8 min-w-0 flex-1 rounded-md border bg-surface px-2 text-sm text-foreground placeholder-gray-400", "focus:outline-none focus:ring-2 focus:ring-primary-500 dark:placeholder-gray-500", invalid ? "border-error-500" : "border-line")
|
|
295
295
|
}), jsxRuntime.jsx("button", {
|
|
296
296
|
type: "button",
|
|
297
297
|
onClick: apply,
|
|
@@ -446,7 +446,7 @@ function RichTextToolbar(_ref2) {
|
|
|
446
446
|
var _excluded = ["id", "className", "editorClassName", "label", "error", "helperText", "required", "disabled", "readOnly", "placeholder", "value", "defaultValue", "onChange", "outputFormat", "onFocus", "onBlur", "toolbar", "toolbarLabel", "stickyToolbar", "minHeight", "maxHeight", "autoFocus", "extensions", "aria-label", "aria-describedby"];
|
|
447
447
|
// Tailwind's preflight strips list bullets, heading sizes, etc. These arbitrary
|
|
448
448
|
// variants restore readable defaults inside the editable area only.
|
|
449
|
-
var CONTENT_CLASSES = cn.cn("px-3 py-2 text-sm text-
|
|
449
|
+
var CONTENT_CLASSES = cn.cn("px-3 py-2 text-sm text-foreground focus:outline-none", "[&_p]:my-1 [&_h1]:my-2 [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:my-2 [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:my-1.5 [&_h3]:text-lg [&_h3]:font-semibold", "[&_ul]:list-disc [&_ul]:pl-6 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-0.5", "[&_blockquote]:my-2 [&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-3 [&_blockquote]:text-gray-600 dark:[&_blockquote]:border-gray-600 dark:[&_blockquote]:text-gray-300", "[&_code]:rounded [&_code]:bg-gray-100 [&_code]:px-1 [&_code]:font-mono [&_code]:text-[0.85em] dark:[&_code]:bg-gray-800", "[&_pre]:my-2 [&_pre]:rounded-md [&_pre]:bg-gray-100 [&_pre]:p-3 dark:[&_pre]:bg-gray-800 [&_pre_code]:bg-transparent [&_pre_code]:p-0", "[&_a]:text-primary-600 [&_a]:underline dark:[&_a]:text-primary-400 [&_hr]:my-3 [&_hr]:border-gray-200 dark:[&_hr]:border-gray-700");
|
|
450
450
|
var toCss = function toCss(v) {
|
|
451
451
|
return typeof v === "number" ? "".concat(v, "px") : v;
|
|
452
452
|
};
|
|
@@ -635,7 +635,7 @@ var RichTextEditor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
635
635
|
className: cn.cn(
|
|
636
636
|
// overflow-clip (not hidden) keeps the rounded corners without
|
|
637
637
|
// creating a scroll container, so a sticky toolbar can stick to the page.
|
|
638
|
-
stickyToolbar ? "overflow-clip" : "overflow-hidden", "rounded-md border bg-
|
|
638
|
+
stickyToolbar ? "overflow-clip" : "overflow-hidden", "rounded-md border bg-surface", error ? "border-error-500" : "border-line", disabled && "cursor-not-allowed opacity-50"),
|
|
639
639
|
children: [showToolbar && jsxRuntime.jsx(RichTextToolbar, {
|
|
640
640
|
editor: editor,
|
|
641
641
|
state: state,
|