@inshorts/glint-ui 0.5.3 → 0.5.4
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/LICENSE +13 -0
- package/README.md +2 -10
- package/package.json +6 -7
- package/src/copy-button.tsx +1 -1
- package/src/switch.tsx +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
UNLICENSED
|
|
2
|
+
|
|
3
|
+
Copyright (c) Inshorts / News In Shorts Private Limited.
|
|
4
|
+
|
|
5
|
+
These packages are published to the public npm registry under the `@inshorts`
|
|
6
|
+
scope for install convenience (Docker / CI without a private registry). They
|
|
7
|
+
are NOT open source.
|
|
8
|
+
|
|
9
|
+
You may use them only as part of Inshorts internal products and services.
|
|
10
|
+
Redistribution, sublicensing, or use outside Inshorts requires written
|
|
11
|
+
permission from News In Shorts Private Limited.
|
|
12
|
+
|
|
13
|
+
All rights reserved.
|
package/README.md
CHANGED
|
@@ -9,20 +9,12 @@ theme tokens.
|
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
Until this is published to the private registry, link the local checkout that
|
|
13
|
-
sits next to your panel repos:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# from inshorts-sales-panel-next (or inpix-panel, users-crm, …)
|
|
17
|
-
pnpm add @inshorts/glint-ui@file:../inshorts-npm-modules/glint/ui
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
After publish:
|
|
21
|
-
|
|
22
12
|
```bash
|
|
23
13
|
pnpm add @inshorts/glint-ui
|
|
24
14
|
```
|
|
25
15
|
|
|
16
|
+
Kit iteration against a sibling checkout: `pnpm add @inshorts/glint-ui@file:../inshorts-npm-modules/glint/ui` (do not commit `file:` in production apps).
|
|
17
|
+
|
|
26
18
|
Peer deps: `react` and `react-dom` ^19.3.
|
|
27
19
|
|
|
28
20
|
## Wire it into a Next + Tailwind 4 panel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inshorts/glint-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Glint Tailwind 4 UI kit for Inshorts Next panels.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -33,11 +33,6 @@
|
|
|
33
33
|
"url": "git+https://github.com/NewsInShorts/inshorts-npm-modules.git",
|
|
34
34
|
"directory": "glint/ui"
|
|
35
35
|
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"typecheck": "tsc --noEmit",
|
|
38
|
-
"test": "vitest run",
|
|
39
|
-
"prepublishOnly": "npm run typecheck && npm test"
|
|
40
|
-
},
|
|
41
36
|
"peerDependencies": {
|
|
42
37
|
"@radix-ui/react-slot": "^1.2.0",
|
|
43
38
|
"lucide-react": "^0.400.0 || ^1.0.0",
|
|
@@ -74,5 +69,9 @@
|
|
|
74
69
|
},
|
|
75
70
|
"publishConfig": {
|
|
76
71
|
"access": "public"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"typecheck": "tsc --noEmit",
|
|
75
|
+
"test": "vitest run"
|
|
77
76
|
}
|
|
78
|
-
}
|
|
77
|
+
}
|
package/src/copy-button.tsx
CHANGED
package/src/switch.tsx
CHANGED
|
@@ -24,7 +24,8 @@ export const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
|
|
|
24
24
|
disabled={disabled}
|
|
25
25
|
onClick={() => onCheckedChange(!checked)}
|
|
26
26
|
className={cn(
|
|
27
|
-
|
|
27
|
+
// 24×44px track meets DESIGN.md 24px minimum target size.
|
|
28
|
+
"relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border transition-colors",
|
|
28
29
|
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
|
|
29
30
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
30
31
|
checked ? "border-primary bg-primary" : "border-border bg-muted",
|
|
@@ -35,8 +36,8 @@ export const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
|
|
|
35
36
|
<span
|
|
36
37
|
aria-hidden
|
|
37
38
|
className={cn(
|
|
38
|
-
"bg-background pointer-events-none block size-
|
|
39
|
-
checked ? "translate-x-
|
|
39
|
+
"bg-background pointer-events-none block size-5 rounded-full shadow-sm transition-transform",
|
|
40
|
+
checked ? "translate-x-5" : "translate-x-0.5",
|
|
40
41
|
)}
|
|
41
42
|
/>
|
|
42
43
|
</button>
|