@dreamtree-org/twreact-ui 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/README.md
CHANGED
|
@@ -989,7 +989,7 @@ function App() {
|
|
|
989
989
|
|
|
990
990
|
`ThemeProvider` sets `data-theme`, the `.dark` class and `color-scheme` on `<html>`, so `dark:` utilities work whether your `tailwind.config.js` uses `darkMode: 'class'` or a `[data-theme="dark"]` selector.
|
|
991
991
|
|
|
992
|
-
Surfaces such as `Card`, `Sidebar`, `Navbar`, `Table`, `FootNav` and `
|
|
992
|
+
Surfaces such as `Card`, `Sidebar`, `Navbar`, `Table`, `FootNav`, `Dropdown`, the `Select` / `DatePicker` / `DateRangePicker` triggers and menus, `Accordion`, `Popover`, `Tour`, `Drawer`, `Pagination`, `LocationPicker`, `Form`'s textarea / file button, the chart tooltip and `RichTextEditor` use the semantic `bg-surface` / `bg-background` / `border-line` / `text-foreground` / `text-muted` tokens, which switch under `.dark` (or `[data-theme="dark"]`). Re-theme them by overriding the `--dt-surface`, `--dt-background`, `--dt-line`, … variables.
|
|
993
993
|
|
|
994
994
|
> **Accessibility fixes (1.4.x):** Radio groups keep a single selection when uncontrolled, Rate and DatePicker use one tab stop with arrow-key focus, Dialog/Sidebar/AppShell drawers share one focus trap and scroll lock, Toast announces via `role="status"`, Alert's dismiss button is labelled, and Input shows a visible focus ring in its default state. No props changed.
|
|
995
995
|
|
package/dist/charts/index.js
CHANGED
|
@@ -57,7 +57,7 @@ function ChartTooltipContent(_ref2) {
|
|
|
57
57
|
hideLabel = _ref2$hideLabel === void 0 ? false : _ref2$hideLabel;
|
|
58
58
|
if (!active || !payload || !payload.length) return null;
|
|
59
59
|
return jsxRuntime.jsxs("div", {
|
|
60
|
-
className: "rounded-md border border-
|
|
60
|
+
className: "rounded-md border border-line bg-surface px-3 py-2 text-xs text-foreground shadow-md",
|
|
61
61
|
"data-chart-tooltip": "",
|
|
62
62
|
children: [!hideLabel && label != null && label !== "" && jsxRuntime.jsx("p", {
|
|
63
63
|
className: "mb-1 font-medium",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/core/Popover.jsx"],"names":[],"mappings":";AA0BA,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/core/Popover.jsx"],"names":[],"mappings":";AA0BA,iFAuIG;kBAjK0D,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tour.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/Tour.jsx"],"names":[],"mappings":";AAwCA,
|
|
1
|
+
{"version":3,"file":"Tour.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/Tour.jsx"],"names":[],"mappings":";AAwCA,8EA8LG;kBAtOoF,OAAO"}
|
|
@@ -50,7 +50,7 @@ function ChartTooltipContent(_ref2) {
|
|
|
50
50
|
hideLabel = _ref2$hideLabel === void 0 ? false : _ref2$hideLabel;
|
|
51
51
|
if (!active || !payload || !payload.length) return null;
|
|
52
52
|
return jsxs("div", {
|
|
53
|
-
className: "rounded-md border border-
|
|
53
|
+
className: "rounded-md border border-line bg-surface px-3 py-2 text-xs text-foreground shadow-md",
|
|
54
54
|
"data-chart-tooltip": "",
|
|
55
55
|
children: [!hideLabel && label != null && label !== "" && jsx("p", {
|
|
56
56
|
className: "mb-1 font-medium",
|
|
@@ -173,7 +173,7 @@ var Accordion = /*#__PURE__*/forwardRef(function Accordion(_ref, ref) {
|
|
|
173
173
|
lg: "rounded-lg",
|
|
174
174
|
xl: "rounded-xl"
|
|
175
175
|
};
|
|
176
|
-
var wrapperClasses = cn(bordered ? "bg-
|
|
176
|
+
var wrapperClasses = cn(bordered ? "bg-surface text-foreground" : "bg-transparent", bordered ? "divide-y divide-line" : "", roundedMap[rounded] || roundedMap.md, "shadow-sm", className);
|
|
177
177
|
var renderLeftIcon = function renderLeftIcon(item, index) {
|
|
178
178
|
var left = item === null || item === void 0 ? void 0 : item.leftIcon;
|
|
179
179
|
if (!left) return null;
|
|
@@ -201,7 +201,7 @@ var Accordion = /*#__PURE__*/forwardRef(function Accordion(_ref, ref) {
|
|
|
201
201
|
var panelId = "".concat(uid, "accordion-panel-").concat(id);
|
|
202
202
|
var leftIconEl = renderLeftIcon(item, index);
|
|
203
203
|
return jsxs("div", {
|
|
204
|
-
className: "bg-
|
|
204
|
+
className: "bg-surface text-foreground",
|
|
205
205
|
children: [jsx("h3", {
|
|
206
206
|
children: jsx("button", {
|
|
207
207
|
ref: function ref(el) {
|
|
@@ -157,7 +157,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
157
157
|
edge: isSel
|
|
158
158
|
};
|
|
159
159
|
};
|
|
160
|
-
var actionClass = isSheet ? "rounded-md px-3 py-2 text-sm hover:bg-
|
|
160
|
+
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";
|
|
161
161
|
var actions = jsxs("div", {
|
|
162
162
|
className: "flex gap-2",
|
|
163
163
|
children: [showClear && jsx("button", {
|
|
@@ -208,7 +208,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
208
208
|
"aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
|
|
209
209
|
"aria-describedby": error ? errorId : helperText ? helperId : undefined,
|
|
210
210
|
"aria-invalid": error ? true : undefined,
|
|
211
|
-
className: cn("flex w-full items-center justify-between rounded-md border border-
|
|
211
|
+
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", {
|
|
212
212
|
"border-error-500 focus:ring-error-500": error,
|
|
213
213
|
// Empty: the placeholder reads muted, like Input's
|
|
214
214
|
// ::placeholder (#159). `className` still merges last.
|
|
@@ -244,7 +244,7 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
244
244
|
// this button unmounts once the value clears
|
|
245
245
|
(_triggerRef$current3 = triggerRef.current) === null || _triggerRef$current3 === void 0 || _triggerRef$current3.focus();
|
|
246
246
|
},
|
|
247
|
-
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-
|
|
247
|
+
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",
|
|
248
248
|
children: jsx(X, {
|
|
249
249
|
className: "h-4 w-4",
|
|
250
250
|
"aria-hidden": "true"
|
|
@@ -298,12 +298,12 @@ var DateRangePicker = /*#__PURE__*/forwardRef(function DateRangePicker(_ref, ref
|
|
|
298
298
|
onClick: function onClick() {
|
|
299
299
|
return applyPreset(preset);
|
|
300
300
|
},
|
|
301
|
-
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-
|
|
301
|
+
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"),
|
|
302
302
|
children: preset.label
|
|
303
303
|
}, preset.label);
|
|
304
304
|
})
|
|
305
305
|
}) : null;
|
|
306
|
-
var actionClass = isSheet ? "rounded-md px-3 py-2 text-sm hover:bg-
|
|
306
|
+
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";
|
|
307
307
|
var calendar = jsx(Calendar, {
|
|
308
308
|
month: currentMonth,
|
|
309
309
|
onMonthChange: setCurrentMonth,
|
|
@@ -358,7 +358,7 @@ var DateRangePicker = /*#__PURE__*/forwardRef(function DateRangePicker(_ref, ref
|
|
|
358
358
|
"aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
|
|
359
359
|
"aria-describedby": error ? errorId : helperText ? helperId : undefined,
|
|
360
360
|
"aria-invalid": error ? true : undefined,
|
|
361
|
-
className: cn("flex w-full items-center justify-between rounded-md border border-
|
|
361
|
+
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", {
|
|
362
362
|
"border-error-500 focus:ring-error-500": error,
|
|
363
363
|
// Empty: the placeholder reads muted, like Input's
|
|
364
364
|
// ::placeholder (#159). `className` still merges last.
|
|
@@ -218,7 +218,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
218
218
|
id: fieldId,
|
|
219
219
|
"aria-invalid": error ? true : undefined,
|
|
220
220
|
"aria-describedby": describedBy,
|
|
221
|
-
className: cn("flex w-full rounded-md border border-
|
|
221
|
+
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", {
|
|
222
222
|
"border-error-500 focus:ring-error-500": error
|
|
223
223
|
}),
|
|
224
224
|
placeholder: placeholder,
|
|
@@ -257,7 +257,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
257
257
|
},
|
|
258
258
|
"aria-invalid": error ? true : undefined,
|
|
259
259
|
"aria-describedby": describedBy,
|
|
260
|
-
className: "rounded border-gray-300 text-primary-600 focus:ring-primary-500"
|
|
260
|
+
className: "rounded border-gray-300 text-primary-600 focus:ring-primary-500 dark:border-gray-600"
|
|
261
261
|
}), label && jsxs("label", {
|
|
262
262
|
htmlFor: fieldId,
|
|
263
263
|
className: "ml-2 text-sm",
|
|
@@ -354,7 +354,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
354
354
|
className: "mt-1 flex items-center",
|
|
355
355
|
children: [jsxs("label", {
|
|
356
356
|
htmlFor: name,
|
|
357
|
-
className: cn("cursor-pointer inline-flex items-center px-4 py-2 border border-
|
|
357
|
+
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", {
|
|
358
358
|
"border-error-500": error
|
|
359
359
|
}),
|
|
360
360
|
children: [jsx("svg", {
|
|
@@ -204,7 +204,7 @@ var LocationPicker = /*#__PURE__*/forwardRef(function LocationPicker(_ref, ref)
|
|
|
204
204
|
}, inputProps), {}, {
|
|
205
205
|
value: text,
|
|
206
206
|
onChange: handleInputChange,
|
|
207
|
-
className: cn("rounded-md border border-
|
|
207
|
+
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)
|
|
208
208
|
})), jsx("div", {
|
|
209
209
|
className: cn("absolute inset-y-0 flex items-center", iconPosition === "right" ? "right-2" : "left-2"),
|
|
210
210
|
children: iconButton
|
|
@@ -166,7 +166,7 @@ var Popover = /*#__PURE__*/React.forwardRef(function (_ref, _ref2) {
|
|
|
166
166
|
onKeyDown: handlePanelKeyDown,
|
|
167
167
|
"data-side": resolvedPlacement.split("-")[0],
|
|
168
168
|
"data-presentation": "popover",
|
|
169
|
-
className: cn("z-popover min-w-[12rem] max-w-sm rounded-lg border border-
|
|
169
|
+
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),
|
|
170
170
|
style: _objectSpread2(_objectSpread2({}, floatingStyles), style)
|
|
171
171
|
}, props), {}, {
|
|
172
172
|
children: [title && jsx("h2", {
|
|
@@ -505,7 +505,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
505
505
|
className: "flex flex-wrap gap-1",
|
|
506
506
|
children: selectedOptions.map(function (opt) {
|
|
507
507
|
return jsxs("div", {
|
|
508
|
-
className: "flex items-center gap-1 rounded-full bg-
|
|
508
|
+
className: "flex items-center gap-1 rounded-full bg-line/60 px-2 py-0.5 text-xs",
|
|
509
509
|
children: [jsx("span", {
|
|
510
510
|
className: "truncate max-w-[8rem]",
|
|
511
511
|
children: opt.label
|
|
@@ -534,7 +534,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
534
534
|
className: "flex flex-wrap gap-1",
|
|
535
535
|
children: selectedOptions.slice(0, maxTagCount).map(function (opt) {
|
|
536
536
|
return jsx("div", {
|
|
537
|
-
className: "flex items-center gap-1 rounded-full bg-
|
|
537
|
+
className: "flex items-center gap-1 rounded-full bg-line/60 px-2 py-0.5 text-xs",
|
|
538
538
|
children: jsx("span", {
|
|
539
539
|
className: "truncate max-w-[6rem]",
|
|
540
540
|
children: opt.label
|
|
@@ -572,7 +572,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
572
572
|
"aria-expanded": !collapsed,
|
|
573
573
|
"aria-controls": collapsed ? undefined : groupOptionsId,
|
|
574
574
|
"aria-label": "".concat(collapsed ? "Expand" : "Collapse", " ").concat(groupName),
|
|
575
|
-
className: "text-xs border border-
|
|
575
|
+
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",
|
|
576
576
|
onClick: function onClick() {
|
|
577
577
|
return setCollapsedGroups(function (prev) {
|
|
578
578
|
return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty({}, group.label, !prev[group.label]));
|
|
@@ -599,16 +599,16 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
599
599
|
onClick: function onClick() {
|
|
600
600
|
return handleSelect(option);
|
|
601
601
|
},
|
|
602
|
-
className: cn("flex items-center hover:bg-
|
|
602
|
+
className: cn("flex items-center hover:bg-line/50 cursor-pointer", rowClass, {
|
|
603
603
|
"opacity-50 cursor-not-allowed": option.disabled,
|
|
604
|
-
"bg-primary-50 text-primary-600": focusedIndex === index
|
|
604
|
+
"bg-primary-50 text-primary-600 dark:bg-primary-900/40 dark:text-primary-300": focusedIndex === index
|
|
605
605
|
}),
|
|
606
606
|
children: [multiSelect && jsx("div", {
|
|
607
607
|
className: "mr-2",
|
|
608
608
|
children: selectedValues.includes(option.value) ? jsx(Check, {
|
|
609
609
|
className: "h-4 w-4 text-primary-600"
|
|
610
610
|
}) : jsx("div", {
|
|
611
|
-
className: "h-4 w-4 rounded border border-gray-300"
|
|
611
|
+
className: "h-4 w-4 rounded border border-gray-300 dark:border-gray-600"
|
|
612
612
|
})
|
|
613
613
|
}), onMenuItemRender ? onMenuItemRender(option) : highlight(option.label, searchTerm), !multiSelect && selectedValues === option.value && jsx(Check, {
|
|
614
614
|
className: "ml-auto h-4 w-4 text-primary-600"
|
|
@@ -637,17 +637,17 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
637
637
|
onClick: function onClick() {
|
|
638
638
|
return handleSelect(option);
|
|
639
639
|
},
|
|
640
|
-
className: cn("flex items-center hover:bg-
|
|
640
|
+
className: cn("flex items-center hover:bg-line/50 cursor-pointer", ROW_CLASSES[isSheet ? "sheet" : "popover"], {
|
|
641
641
|
"opacity-50 cursor-not-allowed": option.disabled,
|
|
642
|
-
"bg-primary-50 text-primary-600": focusedIndex === index,
|
|
643
|
-
"bg-primary-100": multiSelect && selectedValues.includes(option.value)
|
|
642
|
+
"bg-primary-50 text-primary-600 dark:bg-primary-900/40 dark:text-primary-300": focusedIndex === index,
|
|
643
|
+
"bg-primary-100 dark:bg-primary-900/60": multiSelect && selectedValues.includes(option.value)
|
|
644
644
|
}),
|
|
645
645
|
children: [multiSelect && jsx("div", {
|
|
646
646
|
className: "mr-2",
|
|
647
647
|
children: selectedValues.includes(option.value) ? jsx(Check, {
|
|
648
648
|
className: "h-4 w-4 text-primary-600"
|
|
649
649
|
}) : jsx("div", {
|
|
650
|
-
className: "h-4 w-4 rounded border border-gray-300"
|
|
650
|
+
className: "h-4 w-4 rounded border border-gray-300 dark:border-gray-600"
|
|
651
651
|
})
|
|
652
652
|
}), onMenuItemRender ? onMenuItemRender(option) : highlight(option.label, searchTerm), !multiSelect && selectedValues === option.value && jsx(Check, {
|
|
653
653
|
className: "ml-auto h-4 w-4 text-primary-600"
|
|
@@ -659,7 +659,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
659
659
|
children: jsxs("button", {
|
|
660
660
|
type: "button",
|
|
661
661
|
onClick: handleCreate,
|
|
662
|
-
className: "flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-
|
|
662
|
+
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",
|
|
663
663
|
children: [jsx(Plus, {
|
|
664
664
|
className: "h-4 w-4",
|
|
665
665
|
"aria-hidden": "true"
|
|
@@ -687,7 +687,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
687
687
|
className: "h-4 w-4 text-primary-600",
|
|
688
688
|
"aria-hidden": "true"
|
|
689
689
|
}) : jsx("div", {
|
|
690
|
-
className: "h-4 w-4 rounded border border-gray-300"
|
|
690
|
+
className: "h-4 w-4 rounded border border-gray-300 dark:border-gray-600"
|
|
691
691
|
})
|
|
692
692
|
});
|
|
693
693
|
}()
|
|
@@ -752,7 +752,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
752
752
|
"aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
|
|
753
753
|
"aria-describedby": describedBy,
|
|
754
754
|
"aria-invalid": error ? true : undefined,
|
|
755
|
-
className: cn("flex w-full items-center justify-between rounded-md border border-
|
|
755
|
+
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[size] || SIZE_CLASSES.md, {
|
|
756
756
|
"border-error-500 focus:ring-error-500": error,
|
|
757
757
|
// Empty: the placeholder reads muted, like Input's
|
|
758
758
|
// ::placeholder (#159). `className` still merges last.
|
|
@@ -788,7 +788,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
788
788
|
type: "button",
|
|
789
789
|
onClick: handleClear,
|
|
790
790
|
"aria-label": "Clear selection",
|
|
791
|
-
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-
|
|
791
|
+
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),
|
|
792
792
|
children: jsx(X, {
|
|
793
793
|
className: "h-4 w-4",
|
|
794
794
|
"aria-hidden": "true"
|
|
@@ -811,7 +811,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
811
811
|
value: selectedValues !== null && selectedValues !== void 0 ? selectedValues : ""
|
|
812
812
|
})), isOpen && !isSheet && typeof document !== "undefined" && /*#__PURE__*/createPortal(jsxs("div", {
|
|
813
813
|
ref: popoverRef,
|
|
814
|
-
className: "fixed z-popover overflow-auto rounded-md border border-
|
|
814
|
+
className: "fixed z-popover overflow-auto rounded-md border border-line bg-surface text-foreground shadow-lg",
|
|
815
815
|
role: "dialog",
|
|
816
816
|
"data-placement": floatingPlacement.split("-")[0],
|
|
817
817
|
// Portaled to document.body with position:fixed so the menu
|
|
@@ -823,7 +823,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
823
823
|
opacity: 0
|
|
824
824
|
}),
|
|
825
825
|
children: [searchable && jsx("div", {
|
|
826
|
-
className: "border-b border-
|
|
826
|
+
className: "border-b border-line p-2",
|
|
827
827
|
children: renderSearch()
|
|
828
828
|
}), renderListbox()]
|
|
829
829
|
}), document.body)]
|
|
@@ -1225,7 +1225,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
1225
1225
|
type: "button",
|
|
1226
1226
|
"aria-label": "Reload",
|
|
1227
1227
|
title: "Reload",
|
|
1228
|
-
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",
|
|
1228
|
+
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",
|
|
1229
1229
|
onClick: onReload,
|
|
1230
1230
|
children: [jsx(RefreshCcw, {
|
|
1231
1231
|
className: "size-4",
|
|
@@ -305,8 +305,8 @@ function Calendar(_ref3) {
|
|
|
305
305
|
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", {
|
|
306
306
|
"text-primary-400": !currentMonth,
|
|
307
307
|
"bg-primary-600 text-primary-50": state.edge,
|
|
308
|
-
"bg-primary-200": state.inRange && !state.edge,
|
|
309
|
-
"bg-primary-100 text-primary-600": todayDate && !state.edge && !state.inRange,
|
|
308
|
+
"bg-primary-200 dark:bg-primary-900/60": state.inRange && !state.edge,
|
|
309
|
+
"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-300": todayDate && !state.edge && !state.inRange,
|
|
310
310
|
"hover:bg-background": currentMonth && !state.edge && !state.inRange && !disabled,
|
|
311
311
|
"cursor-not-allowed opacity-50": disabled
|
|
312
312
|
}),
|
|
@@ -70,7 +70,7 @@ var DrawerTitleBar = function DrawerTitleBar(_ref2) {
|
|
|
70
70
|
dragProps = _useGrabZone.dragProps,
|
|
71
71
|
grabClass = _useGrabZone.grabClass;
|
|
72
72
|
return jsx("div", _objectSpread2(_objectSpread2({}, dragProps), {}, {
|
|
73
|
-
className: cn("flex shrink-0 items-start justify-between gap-4 border-b border-
|
|
73
|
+
className: cn("flex shrink-0 items-start justify-between gap-4 border-b border-line px-6 py-4", grabClass, className),
|
|
74
74
|
children: children
|
|
75
75
|
}));
|
|
76
76
|
};
|
|
@@ -145,7 +145,7 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
145
145
|
idPrefix: "drawer",
|
|
146
146
|
testIdPrefix: "drawer",
|
|
147
147
|
handleBarClassName: "bg-gray-300 dark:bg-gray-600",
|
|
148
|
-
panelClassName: cn("border-
|
|
148
|
+
panelClassName: cn("border-line bg-surface text-foreground", PLACEMENT_CLASSES[side], sizes[size] || sizes.md),
|
|
149
149
|
renderHeader: renderHeader
|
|
150
150
|
}, props), {}, {
|
|
151
151
|
children: composed ? children : jsxs(Fragment, {
|
|
@@ -153,7 +153,7 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
153
153
|
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-6 py-4",
|
|
154
154
|
children: children
|
|
155
155
|
}), footer && jsx("div", {
|
|
156
|
-
className: "flex shrink-0 items-center justify-end gap-3 border-t border-
|
|
156
|
+
className: "flex shrink-0 items-center justify-end gap-3 border-t border-line px-6 py-4",
|
|
157
157
|
children: footer
|
|
158
158
|
})]
|
|
159
159
|
})
|
|
@@ -169,7 +169,7 @@ var DrawerHeader = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
169
169
|
return jsx("div", _objectSpread2(_objectSpread2(_objectSpread2({
|
|
170
170
|
ref: ref
|
|
171
171
|
}, props), dragProps), {}, {
|
|
172
|
-
className: cn("border-b border-
|
|
172
|
+
className: cn("border-b border-line px-6 py-4", grabClass, className)
|
|
173
173
|
}));
|
|
174
174
|
});
|
|
175
175
|
var DrawerBody = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
|
|
@@ -185,7 +185,7 @@ var DrawerFooter = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
185
185
|
props = _objectWithoutProperties(_ref7, _excluded4);
|
|
186
186
|
return jsx("div", _objectSpread2({
|
|
187
187
|
ref: ref,
|
|
188
|
-
className: cn("flex items-center justify-end gap-3 border-t border-
|
|
188
|
+
className: cn("flex items-center justify-end gap-3 border-t border-line px-6 py-4", className)
|
|
189
189
|
}, props));
|
|
190
190
|
});
|
|
191
191
|
DrawerHeader.displayName = "Drawer.Header";
|
|
@@ -221,7 +221,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
221
221
|
onKeyDown: handleKeyDown,
|
|
222
222
|
"data-placement": placementAttr,
|
|
223
223
|
"data-presentation": docked ? "sheet" : "popover",
|
|
224
|
-
className: cn("fixed overflow-y-auto overscroll-contain rounded-lg border border-
|
|
224
|
+
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),
|
|
225
225
|
style: anchored ? _objectSpread2(_objectSpread2({}, floatingStyles), style) : style
|
|
226
226
|
}, swipeHandlers), rest), {}, {
|
|
227
227
|
children: [jsxs("div", {
|
|
@@ -12,7 +12,7 @@ import { selectToolbarState, DEFAULT_TOOLBAR, RichTextToolbar } from './RichText
|
|
|
12
12
|
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"];
|
|
13
13
|
// Tailwind's preflight strips list bullets, heading sizes, etc. These arbitrary
|
|
14
14
|
// variants restore readable defaults inside the editable area only.
|
|
15
|
-
var CONTENT_CLASSES = cn("px-3 py-2 text-sm text-
|
|
15
|
+
var CONTENT_CLASSES = 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");
|
|
16
16
|
var toCss = function toCss(v) {
|
|
17
17
|
return typeof v === "number" ? "".concat(v, "px") : v;
|
|
18
18
|
};
|
|
@@ -201,7 +201,7 @@ var RichTextEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
201
201
|
className: cn(
|
|
202
202
|
// overflow-clip (not hidden) keeps the rounded corners without
|
|
203
203
|
// creating a scroll container, so a sticky toolbar can stick to the page.
|
|
204
|
-
stickyToolbar ? "overflow-clip" : "overflow-hidden", "rounded-md border bg-
|
|
204
|
+
stickyToolbar ? "overflow-clip" : "overflow-hidden", "rounded-md border bg-surface", error ? "border-error-500" : "border-line", disabled && "cursor-not-allowed opacity-50"),
|
|
205
205
|
children: [showToolbar && jsx(RichTextToolbar, {
|
|
206
206
|
editor: editor,
|
|
207
207
|
state: state,
|
|
@@ -262,7 +262,7 @@ function LinkForm(_ref) {
|
|
|
262
262
|
close();
|
|
263
263
|
}
|
|
264
264
|
},
|
|
265
|
-
className: cn("h-8 min-w-0 flex-1 rounded-md border bg-
|
|
265
|
+
className: 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")
|
|
266
266
|
}), jsx("button", {
|
|
267
267
|
type: "button",
|
|
268
268
|
onClick: apply,
|
|
@@ -9,7 +9,7 @@ import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
|
9
9
|
var _excluded = ["currentPage", "totalPages", "onPageChange", "showFirstLast", "showPrevNext", "maxVisiblePages", "className"];
|
|
10
10
|
// Shared button chrome: dark-safe surface, focus-visible ring, 44px target on coarse pointers.
|
|
11
11
|
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);
|
|
12
|
-
var BUTTON_IDLE = 'border-
|
|
12
|
+
var BUTTON_IDLE = 'border-line bg-surface text-foreground hover:bg-background dark:hover:bg-gray-800';
|
|
13
13
|
var BUTTON_ACTIVE = 'border-primary-500 bg-primary-50 text-primary-600 dark:bg-primary-950 dark:text-primary-300';
|
|
14
14
|
var DISABLED = 'disabled:opacity-50 disabled:cursor-not-allowed';
|
|
15
15
|
var Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|