@sqlrooms/ui 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/editable-text.d.ts +2 -34
- package/dist/components/editable-text.d.ts.map +1 -1
- package/dist/components/editable-text.js +30 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/progress-modal.d.ts +2 -3
- package/dist/components/progress-modal.d.ts.map +1 -1
- package/dist/components/skeleton-pane.d.ts +2 -3
- package/dist/components/skeleton-pane.d.ts.map +1 -1
- package/dist/components/skeleton-pane.js +1 -1
- package/dist/components/spinner-pane.d.ts +2 -3
- package/dist/components/spinner-pane.d.ts.map +1 -1
- package/package.json +7 -3
- package/CHANGELOG.md +0 -14
- package/components.json +0 -21
|
@@ -1,35 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
* Component that allows the user to edit a string.
|
|
4
|
-
*
|
|
5
|
-
* The editing mode can be controlled (the mode is managed by the parent component)
|
|
6
|
-
* or uncontrolled (managed by the component itself).
|
|
7
|
-
*
|
|
8
|
-
* Controlled mode example:
|
|
9
|
-
* ```
|
|
10
|
-
* const [text, setText] = useState('');
|
|
11
|
-
* const [isEditing, setEditing] = useState(false);
|
|
12
|
-
* ...
|
|
13
|
-
* <EditableText
|
|
14
|
-
* value={text}
|
|
15
|
-
* onChange={setText}
|
|
16
|
-
* isEditing={isEditing}
|
|
17
|
-
* onEditingChange={setEditing}
|
|
18
|
-
* />
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* Uncontrolled mode example:
|
|
22
|
-
* ```
|
|
23
|
-
* const [text, setText] = useState('');
|
|
24
|
-
* ...
|
|
25
|
-
* <EditableText
|
|
26
|
-
* value={text}
|
|
27
|
-
* onChange={setText}
|
|
28
|
-
* defaultEditing={false}
|
|
29
|
-
* />
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
type Props = {
|
|
2
|
+
export declare const EditableText: FC<{
|
|
33
3
|
className?: string;
|
|
34
4
|
isReadOnly?: boolean;
|
|
35
5
|
value: string;
|
|
@@ -47,7 +17,5 @@ type Props = {
|
|
|
47
17
|
**/
|
|
48
18
|
isEditing?: boolean;
|
|
49
19
|
onEditingChange?: (isEditing: boolean) => void;
|
|
50
|
-
}
|
|
51
|
-
export declare const EditableText: FC<Props>;
|
|
52
|
-
export {};
|
|
20
|
+
}>;
|
|
53
21
|
//# sourceMappingURL=editable-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable-text.d.ts","sourceRoot":"","sources":["../../src/components/editable-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,EAAE,EAA2C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"editable-text.d.ts","sourceRoot":"","sources":["../../src/components/editable-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,EAAE,EAA2C,MAAM,OAAO,CAAC;AAsChF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC;;;QAGI;IACJ,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;QAEI;IACJ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CA0IA,CAAC"}
|
|
@@ -2,6 +2,36 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { Input } from './input';
|
|
4
4
|
import { cn } from '../lib/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Component that allows the user to edit a string.
|
|
7
|
+
*
|
|
8
|
+
* The editing mode can be controlled (the mode is managed by the parent component)
|
|
9
|
+
* or uncontrolled (managed by the component itself).
|
|
10
|
+
*
|
|
11
|
+
* Controlled mode example:
|
|
12
|
+
* ```
|
|
13
|
+
* const [text, setText] = useState('');
|
|
14
|
+
* const [isEditing, setEditing] = useState(false);
|
|
15
|
+
* ...
|
|
16
|
+
* <EditableText
|
|
17
|
+
* value={text}
|
|
18
|
+
* onChange={setText}
|
|
19
|
+
* isEditing={isEditing}
|
|
20
|
+
* onEditingChange={setEditing}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Uncontrolled mode example:
|
|
25
|
+
* ```
|
|
26
|
+
* const [text, setText] = useState('');
|
|
27
|
+
* ...
|
|
28
|
+
* <EditableText
|
|
29
|
+
* value={text}
|
|
30
|
+
* onChange={setText}
|
|
31
|
+
* defaultEditing={false}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
5
35
|
const EDITING_PAD = 12;
|
|
6
36
|
export const EditableText = ({ className, isReadOnly = false, defaultEditing = false, minWidth = 100, maxWidth = 500, isEditing, placeholder, value, onChange, onEditingChange, }) => {
|
|
7
37
|
const [isInternalEditing, setInternalIsEditing] = useState(defaultEditing);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAEL,eAAe,EACf,SAAS,EACT,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAEL,eAAe,EACf,SAAS,EACT,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,wNAgFW,MAAQ,GAAE,CAAC,OAAO,AAhFd,CAAC;AAa1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,gBAChC,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,0CAGpC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAUF,QAAA,MAAM,QAAQ,6GAWZ,CAAC;AAGH,QAAA,MAAM,SAAS,yJAcb,CAAC;AAGH,QAAA,MAAM,WAAW,8JAmBf,CAAC;AAGH,QAAA,MAAM,eAAe,yHAcnB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAqBf,CAAC;AAGH,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
2
|
+
declare const ProgressModal: FC<{
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
title?: string;
|
|
5
5
|
loadingStage?: string;
|
|
6
6
|
progress?: number;
|
|
7
|
-
}
|
|
8
|
-
declare const ProgressModal: FC<Props>;
|
|
7
|
+
}>;
|
|
9
8
|
export { ProgressModal };
|
|
10
9
|
//# sourceMappingURL=progress-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-modal.d.ts","sourceRoot":"","sources":["../../src/components/progress-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,
|
|
1
|
+
{"version":3,"file":"progress-modal.d.ts","sourceRoot":"","sources":["../../src/components/progress-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAmBA,CAAC;AAEF,OAAO,EAAC,aAAa,EAAC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
declare const SkeletonPane: React.FC<{
|
|
3
3
|
n?: number;
|
|
4
4
|
staggeringDelay?: number;
|
|
5
5
|
rowHeight?: number | string;
|
|
6
6
|
className?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const SkeletonPane: React.FC<Props>;
|
|
7
|
+
}>;
|
|
9
8
|
export { SkeletonPane };
|
|
10
9
|
//# sourceMappingURL=skeleton-pane.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-pane.d.ts","sourceRoot":"","sources":["../../src/components/skeleton-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,
|
|
1
|
+
{"version":3,"file":"skeleton-pane.d.ts","sourceRoot":"","sources":["../../src/components/skeleton-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAC3B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CA0BA,CAAC;AAEF,OAAO,EAAC,YAAY,EAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { cn } from '../lib/utils';
|
|
4
4
|
import { Skeleton } from './skeleton';
|
|
5
|
-
const SkeletonPane = ({ n = 3, staggeringDelay = 200, rowHeight = '20px', className
|
|
5
|
+
const SkeletonPane = ({ n = 3, staggeringDelay = 200, rowHeight = '20px', className }) => {
|
|
6
6
|
const [count, setCount] = React.useState(0);
|
|
7
7
|
React.useEffect(() => {
|
|
8
8
|
if (count >= n)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
declare const SpinnerPane: React.FC<{
|
|
3
3
|
h?: number | string;
|
|
4
4
|
delayed?: boolean;
|
|
5
5
|
className?: string;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare const SpinnerPane: React.FC<SpinnerPaneProps>;
|
|
7
|
+
}>;
|
|
9
8
|
export { SpinnerPane };
|
|
10
9
|
//# sourceMappingURL=spinner-pane.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner-pane.d.ts","sourceRoot":"","sources":["../../src/components/spinner-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"spinner-pane.d.ts","sourceRoot":"","sources":["../../src/components/spinner-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1B,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CA4BA,CAAC;AAEF,OAAO,EAAC,WAAW,EAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqlrooms/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
6
9
|
"publishConfig": {
|
|
7
10
|
"access": "public"
|
|
8
11
|
},
|
|
@@ -20,7 +23,8 @@
|
|
|
20
23
|
"dev": "npm run copy-tailwind-preset && tsc -w",
|
|
21
24
|
"build": "tsc && npm run copy-tailwind-preset",
|
|
22
25
|
"copy-tailwind-preset": "cp src/tailwind-preset.css dist/tailwind-preset.css",
|
|
23
|
-
"lint": "eslint ."
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"typedoc": "typedoc"
|
|
24
28
|
},
|
|
25
29
|
"dependencies": {
|
|
26
30
|
"@hookform/resolvers": "^3.10.0",
|
|
@@ -50,5 +54,5 @@
|
|
|
50
54
|
"autoprefixer": "^10.4.20",
|
|
51
55
|
"tailwindcss": "^3.4.17"
|
|
52
56
|
},
|
|
53
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "32da0b35fe906bdcef42274624d069cc49425a74"
|
|
54
58
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [0.0.1](https://github.com/ilyabo/sqlrooms/compare/v0.0.1-alpha.0...v0.0.1) (2025-01-30)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @sqlrooms/ui
|
|
9
|
-
|
|
10
|
-
## 0.0.1-alpha.0 (2025-01-30)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @sqlrooms/ui
|
|
13
|
-
|
|
14
|
-
**Note:** Version bump only for package @sqlrooms/ui
|
package/components.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "new-york",
|
|
4
|
-
"rsc": false,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "src/tailwind-preset.ts",
|
|
8
|
-
"css": "src/index.css",
|
|
9
|
-
"baseColor": "zinc",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"aliases": {
|
|
14
|
-
"components": "@/ui/components",
|
|
15
|
-
"utils": "@/ui/lib/utils",
|
|
16
|
-
"hooks": "@/ui/hooks",
|
|
17
|
-
"lib": "@/ui/lib",
|
|
18
|
-
"ui": "@/ui/components"
|
|
19
|
-
},
|
|
20
|
-
"iconLibrary": "lucide"
|
|
21
|
-
}
|