@adsgency_npm/adsgency-ads-ui 0.1.0-alpha.1
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 +82 -0
- package/dist/chunk-YJFQM6IB.js +71 -0
- package/dist/chunk-YJFQM6IB.js.map +1 -0
- package/dist/index.cjs +4300 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +743 -0
- package/dist/index.d.ts +743 -0
- package/dist/index.js +4080 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/tokens.css +121 -0
- package/dist/tokens/designTokens.cjs +94 -0
- package/dist/tokens/designTokens.cjs.map +1 -0
- package/dist/tokens/designTokens.d.cts +66 -0
- package/dist/tokens/designTokens.d.ts +66 -0
- package/dist/tokens/designTokens.js +8 -0
- package/dist/tokens/designTokens.js.map +1 -0
- package/dist/tokens/tailwindPreset.cjs +140 -0
- package/dist/tokens/tailwindPreset.cjs.map +1 -0
- package/dist/tokens/tailwindPreset.d.cts +114 -0
- package/dist/tokens/tailwindPreset.d.ts +114 -0
- package/dist/tokens/tailwindPreset.js +120 -0
- package/dist/tokens/tailwindPreset.js.map +1 -0
- package/package.json +112 -0
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# `@adsgency_npm/adsgency-ads-ui`
|
|
2
|
+
|
|
3
|
+
Ads Design System package for AdsGency product surfaces.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
The first published version includes:
|
|
8
|
+
|
|
9
|
+
- `AdsButton`
|
|
10
|
+
- `AdsButtonGroup`
|
|
11
|
+
- `AdsInput`
|
|
12
|
+
- `AdsInputGroup`
|
|
13
|
+
- `AdsInputOTP`
|
|
14
|
+
- `AdsAccordion`
|
|
15
|
+
- Product Dark tokens and CSS variables
|
|
16
|
+
- Tailwind preset
|
|
17
|
+
- Lightweight package-level i18n provider
|
|
18
|
+
|
|
19
|
+
All component implementations are expected to be ADS-specific wrappers around shadcn/ui-style primitives and the current design language, rather than hand-written base components.
|
|
20
|
+
|
|
21
|
+
The package does not expose product business modules, Next-specific runtime code, AntD wrappers, or non-v1 Ads components.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install @adsgency_npm/adsgency-ads-ui
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import {
|
|
33
|
+
AdsAccordion,
|
|
34
|
+
AdsButton,
|
|
35
|
+
AdsButtonGroup,
|
|
36
|
+
AdsI18nProvider,
|
|
37
|
+
AdsInput,
|
|
38
|
+
AdsInputGroup,
|
|
39
|
+
AdsInputOTP,
|
|
40
|
+
} from "@adsgency_npm/adsgency-ads-ui";
|
|
41
|
+
import "@adsgency_npm/adsgency-ads-ui/styles.css";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Tailwind:
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
const adsUiPreset = require("@adsgency_npm/adsgency-ads-ui/tailwind-preset");
|
|
48
|
+
|
|
49
|
+
module.exports = {
|
|
50
|
+
presets: [adsUiPreset],
|
|
51
|
+
content: [
|
|
52
|
+
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
53
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
54
|
+
"./node_modules/@adsgency_npm/adsgency-ads-ui/dist/**/*.{js,cjs,mjs}",
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Public API
|
|
60
|
+
|
|
61
|
+
Allowed imports:
|
|
62
|
+
|
|
63
|
+
- `@adsgency_npm/adsgency-ads-ui`
|
|
64
|
+
- `@adsgency_npm/adsgency-ads-ui/styles.css`
|
|
65
|
+
- `@adsgency_npm/adsgency-ads-ui/tailwind-preset`
|
|
66
|
+
- `@adsgency_npm/adsgency-ads-ui/tokens`
|
|
67
|
+
|
|
68
|
+
Disallowed imports:
|
|
69
|
+
|
|
70
|
+
- `@adsgency_npm/adsgency-ads-ui/src/...`
|
|
71
|
+
- `@adsgency_npm/adsgency-ads-ui/dist/...`
|
|
72
|
+
- `@adsgency_npm/adsgency-ads-ui/primitives/...`
|
|
73
|
+
|
|
74
|
+
## Local Demo
|
|
75
|
+
|
|
76
|
+
Run the local playground:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pnpm demo
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The demo is served from `http://127.0.0.1:4173` and uses the local source tree for fast wrapper-level iteration.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/tokens/designTokens.ts
|
|
4
|
+
var designTokens = {
|
|
5
|
+
background: "#151619",
|
|
6
|
+
foreground: "#fdfdfd",
|
|
7
|
+
card: "#1b1c21",
|
|
8
|
+
cardForeground: "#fdfdfd",
|
|
9
|
+
popover: "#2a2b2f",
|
|
10
|
+
popoverForeground: "#fdfdfd",
|
|
11
|
+
primary: "#844fff",
|
|
12
|
+
primaryForeground: "#fdfdfd",
|
|
13
|
+
secondary: "#3f4043",
|
|
14
|
+
secondaryForeground: "#fdfdfd",
|
|
15
|
+
muted: "#3f4043",
|
|
16
|
+
mutedForeground: "#7e7f81",
|
|
17
|
+
accent: "#3f4043",
|
|
18
|
+
accentForeground: "#fdfdfd",
|
|
19
|
+
destructive: "#dc2626",
|
|
20
|
+
destructiveForeground: "#ff9b9b",
|
|
21
|
+
border: "#545558",
|
|
22
|
+
input: "#151619",
|
|
23
|
+
ring: "#a984ff",
|
|
24
|
+
brandSecondary: "#af41ff",
|
|
25
|
+
brandSecondaryForeground: "#151619",
|
|
26
|
+
brandGradientFrom: "#6859ff",
|
|
27
|
+
brandGradientTo: "#af41ff",
|
|
28
|
+
success: "#008e61",
|
|
29
|
+
successForeground: "#fdfdfd",
|
|
30
|
+
warning: "#cd6c00",
|
|
31
|
+
warningForeground: "#fdfdfd",
|
|
32
|
+
info: "#844fff",
|
|
33
|
+
infoForeground: "#fdfdfd",
|
|
34
|
+
borderMuted: "#3f4043",
|
|
35
|
+
active: "#422880",
|
|
36
|
+
activeForeground: "#fdfdfd",
|
|
37
|
+
labelForeground: "#a8a9aa",
|
|
38
|
+
icon: "#939496",
|
|
39
|
+
iconMuted: "#545558",
|
|
40
|
+
spacing: {
|
|
41
|
+
xs: "0.25rem",
|
|
42
|
+
sm: "0.5rem",
|
|
43
|
+
md: "0.75rem",
|
|
44
|
+
lg: "1rem",
|
|
45
|
+
xl: "1.5rem",
|
|
46
|
+
"2xl": "2rem"
|
|
47
|
+
},
|
|
48
|
+
radius: {
|
|
49
|
+
sm: "0.25rem",
|
|
50
|
+
md: "0.375rem",
|
|
51
|
+
lg: "0.5rem",
|
|
52
|
+
xl: "0.75rem",
|
|
53
|
+
full: "9999px"
|
|
54
|
+
},
|
|
55
|
+
size: {
|
|
56
|
+
controlHeight: "2.5rem",
|
|
57
|
+
modalWidth: "42rem",
|
|
58
|
+
sidebarWidth: "17.5rem"
|
|
59
|
+
},
|
|
60
|
+
zIndex: {
|
|
61
|
+
toolbar: 30,
|
|
62
|
+
overlay: 40,
|
|
63
|
+
modal: 50,
|
|
64
|
+
toast: 60
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
designTokens
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=chunk-YJFQM6IB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tokens/designTokens.ts"],"sourcesContent":["export const designTokens = {\n background: \"#151619\",\n foreground: \"#fdfdfd\",\n card: \"#1b1c21\",\n cardForeground: \"#fdfdfd\",\n popover: \"#2a2b2f\",\n popoverForeground: \"#fdfdfd\",\n primary: \"#844fff\",\n primaryForeground: \"#fdfdfd\",\n secondary: \"#3f4043\",\n secondaryForeground: \"#fdfdfd\",\n muted: \"#3f4043\",\n mutedForeground: \"#7e7f81\",\n accent: \"#3f4043\",\n accentForeground: \"#fdfdfd\",\n destructive: \"#dc2626\",\n destructiveForeground: \"#ff9b9b\",\n border: \"#545558\",\n input: \"#151619\",\n ring: \"#a984ff\",\n brandSecondary: \"#af41ff\",\n brandSecondaryForeground: \"#151619\",\n brandGradientFrom: \"#6859ff\",\n brandGradientTo: \"#af41ff\",\n success: \"#008e61\",\n successForeground: \"#fdfdfd\",\n warning: \"#cd6c00\",\n warningForeground: \"#fdfdfd\",\n info: \"#844fff\",\n infoForeground: \"#fdfdfd\",\n borderMuted: \"#3f4043\",\n active: \"#422880\",\n activeForeground: \"#fdfdfd\",\n labelForeground: \"#a8a9aa\",\n icon: \"#939496\",\n iconMuted: \"#545558\",\n spacing: {\n xs: \"0.25rem\",\n sm: \"0.5rem\",\n md: \"0.75rem\",\n lg: \"1rem\",\n xl: \"1.5rem\",\n \"2xl\": \"2rem\",\n },\n radius: {\n sm: \"0.25rem\",\n md: \"0.375rem\",\n lg: \"0.5rem\",\n xl: \"0.75rem\",\n full: \"9999px\",\n },\n size: {\n controlHeight: \"2.5rem\",\n modalWidth: \"42rem\",\n sidebarWidth: \"17.5rem\",\n },\n zIndex: {\n toolbar: 30,\n overlay: 40,\n modal: 50,\n toast: 60,\n },\n} as const;\n\nexport type DesignTokens = typeof designTokens;\n"],"mappings":";;;AAAO,IAAM,eAAe;AAAA,EAC1B,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;","names":[]}
|