@bizapps/design-system-testing 1.8.1 → 1.10.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 +6 -3
- package/dist/editor.cjs +12 -7
- package/dist/editor.cjs.map +1 -1
- package/dist/editor.js +12 -7
- package/dist/editor.js.map +1 -1
- package/dist/main.cjs +244 -6
- package/dist/main.cjs.map +1 -1
- package/dist/main.css +1 -1
- package/dist/main.d.cts +132 -2
- package/dist/main.d.ts +132 -2
- package/dist/main.js +241 -9
- package/dist/main.js.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -180,6 +180,7 @@ function App() {
|
|
|
180
180
|
| `Radio` | `import { RadioGroup } from '@bizapps/ui'` |
|
|
181
181
|
| `Select` | `import { Select } from '@bizapps/ui'` |
|
|
182
182
|
| `Separator` | `import { Separator } from '@bizapps/ui'` |
|
|
183
|
+
| `SignaturePad` | `import { SignaturePad } from '@bizapps/ui'` |
|
|
183
184
|
| `Skeleton` | `import { Skeleton } from '@bizapps/ui'` |
|
|
184
185
|
| `Slider` | `import { Slider } from '@bizapps/ui'` |
|
|
185
186
|
| `Spinner` | `import { Spinner } from '@bizapps/ui'` |
|
|
@@ -228,9 +229,11 @@ Fonts and logos are served via CloudFront CDN (`https://dibt9vplwriap.cloudfront
|
|
|
228
229
|
```tsx
|
|
229
230
|
import { logos, type LogoKey } from '@bizapps/ui';
|
|
230
231
|
|
|
231
|
-
//
|
|
232
|
-
|
|
233
|
-
<img src={logos.
|
|
232
|
+
// Total Civil (unprefixed): color | colorAna | colorAnaa | negative | positive | grayScale | monochBlack | monochOrange | isotype
|
|
233
|
+
// Total Millwork (millwork-prefixed): millworkColor | millworkNegative
|
|
234
|
+
<img src={logos.color} alt="Total Civil logo" />
|
|
235
|
+
<img src={logos.negative} alt="Total Civil logo" height={40} />
|
|
236
|
+
<img src={logos.millworkColor} alt="Total Millwork logo" height={40} />
|
|
234
237
|
```
|
|
235
238
|
|
|
236
239
|
---
|
package/dist/editor.cjs
CHANGED
|
@@ -709,10 +709,11 @@ function Input({ className, type, ...props }) {
|
|
|
709
709
|
type,
|
|
710
710
|
"data-slot": "input",
|
|
711
711
|
className: cn(
|
|
712
|
-
"border-input
|
|
713
|
-
"placeholder:text-muted-foreground",
|
|
712
|
+
"border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[border-color,box-shadow] outline-hidden md:text-sm",
|
|
713
|
+
"placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",
|
|
714
|
+
"file:text-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
714
715
|
"focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-3",
|
|
715
|
-
"disabled:
|
|
716
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
716
717
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3",
|
|
717
718
|
"dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
718
719
|
className
|
|
@@ -983,9 +984,12 @@ function createResizableImage(options) {
|
|
|
983
984
|
});
|
|
984
985
|
}
|
|
985
986
|
function LinkActions({ editor, labels, onEdit, onOpen }) {
|
|
986
|
-
const href = react$1.useEditorState({
|
|
987
|
+
const { href, canOpen } = react$1.useEditorState({
|
|
987
988
|
editor,
|
|
988
|
-
selector: ({ editor: current }) =>
|
|
989
|
+
selector: ({ editor: current }) => {
|
|
990
|
+
const value = current.getAttributes("link").href ?? "";
|
|
991
|
+
return { href: value, canOpen: !!value && current.can().setLink({ href: value }) };
|
|
992
|
+
}
|
|
989
993
|
});
|
|
990
994
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
991
995
|
"div",
|
|
@@ -1002,9 +1006,9 @@ function LinkActions({ editor, labels, onEdit, onOpen }) {
|
|
|
1002
1006
|
variant: "ghost",
|
|
1003
1007
|
title: labels.open,
|
|
1004
1008
|
"aria-label": labels.open,
|
|
1005
|
-
disabled: !
|
|
1009
|
+
disabled: !canOpen,
|
|
1006
1010
|
onClick: () => {
|
|
1007
|
-
if (!
|
|
1011
|
+
if (!canOpen) return;
|
|
1008
1012
|
if (onOpen) {
|
|
1009
1013
|
onOpen(href);
|
|
1010
1014
|
return;
|
|
@@ -1171,6 +1175,7 @@ function useRichTextEditor({
|
|
|
1171
1175
|
(href, text) => {
|
|
1172
1176
|
if (!editor) return;
|
|
1173
1177
|
const url = href.trim();
|
|
1178
|
+
if (url && !editor.can().setLink({ href: url })) return;
|
|
1174
1179
|
if (linkNeedsText) {
|
|
1175
1180
|
if (url && text?.trim()) {
|
|
1176
1181
|
editor.chain().focus().insertContent({
|