@smartyweb/ui 1.0.3 → 1.1.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 +40 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +124 -12
- package/dist/text/BodyLarge/BodyLarge.d.ts +7 -0
- package/dist/text/BodyLarge/index.d.ts +1 -0
- package/dist/text/BodySmall/BodySmall.d.ts +7 -0
- package/dist/text/BodySmall/index.d.ts +1 -0
- package/dist/text/ButtonLarge/ButtonLarge.d.ts +7 -0
- package/dist/text/ButtonLarge/index.d.ts +1 -0
- package/dist/text/ButtonSmall/ButtonSmall.d.ts +7 -0
- package/dist/text/ButtonSmall/index.d.ts +1 -0
- package/dist/text/CaptionLarge/CaptionLarge.d.ts +7 -0
- package/dist/text/CaptionLarge/index.d.ts +1 -0
- package/dist/text/CaptionMedium/CaptionMedium.d.ts +7 -0
- package/dist/text/CaptionMedium/index.d.ts +1 -0
- package/dist/text/CaptionUppercase/CaptionUppercase.d.ts +7 -0
- package/dist/text/CaptionUppercase/index.d.ts +1 -0
- package/dist/text/Code/Code.d.ts +7 -0
- package/dist/text/Code/index.d.ts +1 -0
- package/dist/text/H2/H2.d.ts +7 -0
- package/dist/text/H2/index.d.ts +1 -0
- package/dist/text/H3/H3.d.ts +7 -0
- package/dist/text/H3/index.d.ts +1 -0
- package/dist/text/H4/H4.d.ts +7 -0
- package/dist/text/H4/index.d.ts +1 -0
- package/dist/text/H5/H5.d.ts +7 -0
- package/dist/text/H5/index.d.ts +1 -0
- package/dist/text/H6/H6.d.ts +7 -0
- package/dist/text/H6/index.d.ts +1 -0
- package/dist/text/Paragraph/Paragraph.d.ts +7 -0
- package/dist/text/Paragraph/index.d.ts +1 -0
- package/dist/text/index.d.ts +14 -0
- package/dist/ui.css +1 -1
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ Shared React component library consumed by multiple Next.js microservices via pr
|
|
|
8
8
|
- Vite (outputs ESM + CJS + types to `dist/`)
|
|
9
9
|
- Storybook v10 for component development and documentation
|
|
10
10
|
- Changesets for versioning and changelogs
|
|
11
|
+
- Style Dictionary v4 for design token transformation
|
|
11
12
|
|
|
12
13
|
## Getting Started
|
|
13
14
|
|
|
@@ -21,12 +22,22 @@ npm install
|
|
|
21
22
|
npm run storybook
|
|
22
23
|
```
|
|
23
24
|
|
|
25
|
+
This also runs `node sd.config.js` first to generate CSS tokens from `tokens.json`.
|
|
26
|
+
|
|
24
27
|
### Build
|
|
25
28
|
|
|
26
29
|
```bash
|
|
27
30
|
npm run build
|
|
28
31
|
```
|
|
29
32
|
|
|
33
|
+
### Tokens only
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm run tokens
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Regenerates `src/styles/_tokens.generated.scss` from `tokens.json` without building or starting Storybook.
|
|
40
|
+
|
|
30
41
|
## Usage
|
|
31
42
|
|
|
32
43
|
Install the package in your consuming app:
|
|
@@ -50,17 +61,19 @@ import { Button } from "@smartyweb/ui";
|
|
|
50
61
|
## Project Structure
|
|
51
62
|
|
|
52
63
|
```
|
|
64
|
+
sd.config.js # Style Dictionary config — tokens.json → _tokens.generated.scss
|
|
65
|
+
tokens.json # Designer-owned, synced from Tokens Studio (Figma plugin)
|
|
53
66
|
src/
|
|
54
|
-
|
|
67
|
+
text/
|
|
55
68
|
ComponentName/
|
|
56
69
|
ComponentName.tsx # "use client" at top
|
|
57
|
-
ComponentName.module.scss
|
|
70
|
+
ComponentName.module.scss # uses var(--token-*) CSS custom properties
|
|
58
71
|
ComponentName.stories.tsx
|
|
59
72
|
index.ts # named export
|
|
60
73
|
index.ts # barrel export
|
|
61
74
|
styles/
|
|
62
|
-
_variables.scss
|
|
63
|
-
|
|
75
|
+
_variables.scss # SCSS variables (fonts, weights, breakpoints, font-feature-settings)
|
|
76
|
+
_tokens.generated.scss # Auto-generated by sd.config.js — do not edit manually
|
|
64
77
|
global.scss
|
|
65
78
|
index.ts # main entry point
|
|
66
79
|
```
|
|
@@ -131,6 +144,28 @@ Two secured repository variables must be configured under **Bitbucket repo → S
|
|
|
131
144
|
|
|
132
145
|
Mark both as **Secured** so they are masked in logs.
|
|
133
146
|
|
|
147
|
+
## Design Tokens
|
|
148
|
+
|
|
149
|
+
Design tokens flow from Figma → code via this pipeline:
|
|
150
|
+
|
|
151
|
+
1. **Designer** makes changes in Tokens Studio (Figma plugin) and syncs to the `design/tokens-update` branch
|
|
152
|
+
2. **CI** (Bitbucket Pipelines) runs `npm run tokens` on push, regenerates `src/styles/_tokens.generated.scss`, and commits the diff automatically
|
|
153
|
+
3. **Team** reviews the PR (seeing the exact CSS variable changes) and merges to `master`
|
|
154
|
+
4. **Build** on `master` includes the updated tokens in `dist/ui.css`
|
|
155
|
+
|
|
156
|
+
`sd.config.js` reads only the `Responsive/Desktop`, `Responsive/Tablet`, and `Responsive/Mobile` token sets, outputting ~99 CSS custom properties like:
|
|
157
|
+
|
|
158
|
+
```css
|
|
159
|
+
:root {
|
|
160
|
+
--h1-desktop-font-size: 64px;
|
|
161
|
+
--h1-desktop-line-height: 64px;
|
|
162
|
+
--h1-desktop-letter-spacing: -0.02em;
|
|
163
|
+
/* ... */
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Text components consume these via `var(--{component}-{breakpoint}-{property})`. Font families, weights, and OpenType feature settings remain as SCSS variables in `_variables.scss`.
|
|
168
|
+
|
|
134
169
|
## Architecture
|
|
135
170
|
|
|
136
171
|
- **Component library only** — no routing, no pages, no app logic.
|
|
@@ -138,3 +173,4 @@ Mark both as **Secured** so they are masked in logs.
|
|
|
138
173
|
- **CSS is compiled to a single file at build time.** No runtime CSS injection.
|
|
139
174
|
- **React is a peerDependency**, not bundled.
|
|
140
175
|
- **Stories are co-located with components.**
|
|
176
|
+
- **`_tokens.generated.scss` is committed** so token changes are visible in PR diffs, but never edit it manually — always regenerate via `npm run tokens`.
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),e="_hExtra_dx1fb_1",c={hExtra:e};function l({as:a="h1",children:s,className:t}){const n=[c.hExtra,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const r="_h1_iuejz_1",i={h1:r};function u({children:a,className:s}){return o.jsx("h1",{className:`${i.h1}${s?` ${s}`:""}`,children:a})}const m="_h2_1i98w_1",p={h2:m};function _({as:a="h2",children:s,className:t}){const n=[p.h2,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const h="_h3_wip1f_1",f={h3:h};function j({as:a="h3",children:s,className:t}){const n=[f.h3,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const y="_h4_thwwf_1",d={h4:y};function g({as:a="h4",children:s,className:t}){const n=[d.h4,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const N="_h5_zem0s_1",x={h5:N};function B({as:a="h5",children:s,className:t}){const n=[x.h5,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const b="_h6_py9o3_1",L={h6:b};function $({as:a="h6",children:s,className:t}){const n=[L.h6,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const H="_paragraph_6mdxp_1",S={paragraph:H};function C({as:a="p",children:s,className:t}){const n=[S.paragraph,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const M="_bodyLarge_zgxpr_1",z={bodyLarge:M};function E({as:a="p",children:s,className:t}){const n=[z.bodyLarge,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const U="_bodySmall_izgxi_1",w={bodySmall:U};function P({as:a="p",children:s,className:t}){const n=[w.bodySmall,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const v="_buttonLarge_hwbzl_1",q={buttonLarge:v};function O({as:a="span",children:s,className:t}){const n=[q.buttonLarge,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const R="_buttonSmall_1psts_1",T={buttonSmall:R};function k({as:a="span",children:s,className:t}){const n=[T.buttonSmall,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const A="_captionLarge_lev6r_1",D={captionLarge:A};function F({as:a="span",children:s,className:t}){const n=[D.captionLarge,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const G="_captionMedium_1gxrg_1",I={captionMedium:G};function J({as:a="span",children:s,className:t}){const n=[I.captionMedium,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const K="_captionUppercase_1mzfy_1",Q={captionUppercase:K};function V({as:a="span",children:s,className:t}){const n=[Q.captionUppercase,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}const W="_code_1to1m_1",X={code:W};function Y({as:a="code",children:s,className:t}){const n=[X.code,t].filter(Boolean).join(" ");return o.jsx(a,{className:n,children:s})}exports.BodyLarge=E;exports.BodySmall=P;exports.ButtonLarge=O;exports.ButtonSmall=k;exports.CaptionLarge=F;exports.CaptionMedium=J;exports.CaptionUppercase=V;exports.Code=Y;exports.H1=u;exports.H2=_;exports.H3=j;exports.H4=g;exports.H5=B;exports.H6=$;exports.HExtra=l;exports.Paragraph=C;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,130 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const
|
|
3
|
-
hExtra:
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const e = "_hExtra_dx1fb_1", c = {
|
|
3
|
+
hExtra: e
|
|
4
4
|
};
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
return /* @__PURE__ */
|
|
5
|
+
function A({ as: a = "h1", children: s, className: n }) {
|
|
6
|
+
const t = [c.hExtra, n].filter(Boolean).join(" ");
|
|
7
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
h1:
|
|
9
|
+
const l = "_h1_iuejz_1", r = {
|
|
10
|
+
h1: l
|
|
11
11
|
};
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
function D({ children: a, className: s }) {
|
|
13
|
+
return /* @__PURE__ */ o("h1", { className: `${r.h1}${s ? ` ${s}` : ""}`, children: a });
|
|
14
|
+
}
|
|
15
|
+
const i = "_h2_1i98w_1", m = {
|
|
16
|
+
h2: i
|
|
17
|
+
};
|
|
18
|
+
function F({ as: a = "h2", children: s, className: n }) {
|
|
19
|
+
const t = [m.h2, n].filter(Boolean).join(" ");
|
|
20
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
21
|
+
}
|
|
22
|
+
const p = "_h3_wip1f_1", u = {
|
|
23
|
+
h3: p
|
|
24
|
+
};
|
|
25
|
+
function G({ as: a = "h3", children: s, className: n }) {
|
|
26
|
+
const t = [u.h3, n].filter(Boolean).join(" ");
|
|
27
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
28
|
+
}
|
|
29
|
+
const _ = "_h4_thwwf_1", h = {
|
|
30
|
+
h4: _
|
|
31
|
+
};
|
|
32
|
+
function I({ as: a = "h4", children: s, className: n }) {
|
|
33
|
+
const t = [h.h4, n].filter(Boolean).join(" ");
|
|
34
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
35
|
+
}
|
|
36
|
+
const f = "_h5_zem0s_1", N = {
|
|
37
|
+
h5: f
|
|
38
|
+
};
|
|
39
|
+
function J({ as: a = "h5", children: s, className: n }) {
|
|
40
|
+
const t = [N.h5, n].filter(Boolean).join(" ");
|
|
41
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
42
|
+
}
|
|
43
|
+
const y = "_h6_py9o3_1", d = {
|
|
44
|
+
h6: y
|
|
45
|
+
};
|
|
46
|
+
function K({ as: a = "h6", children: s, className: n }) {
|
|
47
|
+
const t = [d.h6, n].filter(Boolean).join(" ");
|
|
48
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
49
|
+
}
|
|
50
|
+
const g = "_paragraph_6mdxp_1", b = {
|
|
51
|
+
paragraph: g
|
|
52
|
+
};
|
|
53
|
+
function O({ as: a = "p", children: s, className: n }) {
|
|
54
|
+
const t = [b.paragraph, n].filter(Boolean).join(" ");
|
|
55
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
56
|
+
}
|
|
57
|
+
const B = "_bodyLarge_zgxpr_1", $ = {
|
|
58
|
+
bodyLarge: B
|
|
59
|
+
};
|
|
60
|
+
function Q({ as: a = "p", children: s, className: n }) {
|
|
61
|
+
const t = [$.bodyLarge, n].filter(Boolean).join(" ");
|
|
62
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
63
|
+
}
|
|
64
|
+
const j = "_bodySmall_izgxi_1", L = {
|
|
65
|
+
bodySmall: j
|
|
66
|
+
};
|
|
67
|
+
function R({ as: a = "p", children: s, className: n }) {
|
|
68
|
+
const t = [L.bodySmall, n].filter(Boolean).join(" ");
|
|
69
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
70
|
+
}
|
|
71
|
+
const x = "_buttonLarge_hwbzl_1", S = {
|
|
72
|
+
buttonLarge: x
|
|
73
|
+
};
|
|
74
|
+
function T({ as: a = "span", children: s, className: n }) {
|
|
75
|
+
const t = [S.buttonLarge, n].filter(Boolean).join(" ");
|
|
76
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
77
|
+
}
|
|
78
|
+
const H = "_buttonSmall_1psts_1", z = {
|
|
79
|
+
buttonSmall: H
|
|
80
|
+
};
|
|
81
|
+
function V({ as: a = "span", children: s, className: n }) {
|
|
82
|
+
const t = [z.buttonSmall, n].filter(Boolean).join(" ");
|
|
83
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
84
|
+
}
|
|
85
|
+
const w = "_captionLarge_lev6r_1", E = {
|
|
86
|
+
captionLarge: w
|
|
87
|
+
};
|
|
88
|
+
function W({ as: a = "span", children: s, className: n }) {
|
|
89
|
+
const t = [E.captionLarge, n].filter(Boolean).join(" ");
|
|
90
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
91
|
+
}
|
|
92
|
+
const M = "_captionMedium_1gxrg_1", U = {
|
|
93
|
+
captionMedium: M
|
|
94
|
+
};
|
|
95
|
+
function X({ as: a = "span", children: s, className: n }) {
|
|
96
|
+
const t = [U.captionMedium, n].filter(Boolean).join(" ");
|
|
97
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
98
|
+
}
|
|
99
|
+
const C = "_captionUppercase_1mzfy_1", v = {
|
|
100
|
+
captionUppercase: C
|
|
101
|
+
};
|
|
102
|
+
function Y({ as: a = "span", children: s, className: n }) {
|
|
103
|
+
const t = [v.captionUppercase, n].filter(Boolean).join(" ");
|
|
104
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
105
|
+
}
|
|
106
|
+
const P = "_code_1to1m_1", k = {
|
|
107
|
+
code: P
|
|
108
|
+
};
|
|
109
|
+
function Z({ as: a = "code", children: s, className: n }) {
|
|
110
|
+
const t = [k.code, n].filter(Boolean).join(" ");
|
|
111
|
+
return /* @__PURE__ */ o(a, { className: t, children: s });
|
|
14
112
|
}
|
|
15
113
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
114
|
+
Q as BodyLarge,
|
|
115
|
+
R as BodySmall,
|
|
116
|
+
T as ButtonLarge,
|
|
117
|
+
V as ButtonSmall,
|
|
118
|
+
W as CaptionLarge,
|
|
119
|
+
X as CaptionMedium,
|
|
120
|
+
Y as CaptionUppercase,
|
|
121
|
+
Z as Code,
|
|
122
|
+
D as H1,
|
|
123
|
+
F as H2,
|
|
124
|
+
G as H3,
|
|
125
|
+
I as H4,
|
|
126
|
+
J as H5,
|
|
127
|
+
K as H6,
|
|
128
|
+
A as HExtra,
|
|
129
|
+
O as Paragraph
|
|
18
130
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface BodyLargeProps {
|
|
3
|
+
as?: "p" | "div" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function BodyLarge({ as: Tag, children, className }: BodyLargeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BodyLarge } from './BodyLarge';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface BodySmallProps {
|
|
3
|
+
as?: "p" | "div" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function BodySmall({ as: Tag, children, className }: BodySmallProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BodySmall } from './BodySmall';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ButtonLargeProps {
|
|
3
|
+
as?: "span" | "p" | "div";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ButtonLarge({ as: Tag, children, className }: ButtonLargeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonLarge } from './ButtonLarge';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ButtonSmallProps {
|
|
3
|
+
as?: "span" | "p" | "div";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ButtonSmall({ as: Tag, children, className }: ButtonSmallProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonSmall } from './ButtonSmall';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CaptionLargeProps {
|
|
3
|
+
as?: "span" | "p" | "div";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CaptionLarge({ as: Tag, children, className }: CaptionLargeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CaptionLarge } from './CaptionLarge';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CaptionMediumProps {
|
|
3
|
+
as?: "span" | "p" | "div";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CaptionMedium({ as: Tag, children, className }: CaptionMediumProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CaptionMedium } from './CaptionMedium';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CaptionUppercaseProps {
|
|
3
|
+
as?: "span" | "p" | "div";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CaptionUppercase({ as: Tag, children, className }: CaptionUppercaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CaptionUppercase } from './CaptionUppercase';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CodeProps {
|
|
3
|
+
as?: "code" | "pre";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Code({ as: Tag, children, className }: CodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Code } from './Code';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface H2Props {
|
|
3
|
+
as?: "h1" | "h2" | "h3" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function H2({ as: Tag, children, className }: H2Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { H2 } from './H2';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface H3Props {
|
|
3
|
+
as?: "h2" | "h3" | "h4" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function H3({ as: Tag, children, className }: H3Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { H3 } from './H3';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface H4Props {
|
|
3
|
+
as?: "h3" | "h4" | "h5" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function H4({ as: Tag, children, className }: H4Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { H4 } from './H4';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface H5Props {
|
|
3
|
+
as?: "h4" | "h5" | "h6" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function H5({ as: Tag, children, className }: H5Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { H5 } from './H5';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface H6Props {
|
|
3
|
+
as?: "h5" | "h6" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function H6({ as: Tag, children, className }: H6Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { H6 } from './H6';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ParagraphProps {
|
|
3
|
+
as?: "p" | "div" | "span";
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Paragraph({ as: Tag, children, className }: ParagraphProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Paragraph } from './Paragraph';
|
package/dist/text/index.d.ts
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
export * from './HExtra';
|
|
2
2
|
export * from './H1';
|
|
3
|
+
export * from './H2';
|
|
4
|
+
export * from './H3';
|
|
5
|
+
export * from './H4';
|
|
6
|
+
export * from './H5';
|
|
7
|
+
export * from './H6';
|
|
8
|
+
export * from './Paragraph';
|
|
9
|
+
export * from './BodyLarge';
|
|
10
|
+
export * from './BodySmall';
|
|
11
|
+
export * from './ButtonLarge';
|
|
12
|
+
export * from './ButtonSmall';
|
|
13
|
+
export * from './CaptionLarge';
|
|
14
|
+
export * from './CaptionMedium';
|
|
15
|
+
export * from './CaptionUppercase';
|
|
16
|
+
export * from './Code';
|
package/dist/ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._hExtra_zekit_1{font-family:var(--ui-font-primary);font-weight:600;font-size:96px;line-height:106px;letter-spacing:-.03em;font-feature-settings:"dlig" 1;margin:0}@media(max-width:767px){._hExtra_zekit_1{font-size:56px;line-height:62px;letter-spacing:-.02em}}._h1_1w27n_1{font-family:var(--ui-font-primary);font-weight:500;font-size:64px;line-height:64px;letter-spacing:-.02em;font-feature-settings:"dlig" 1;margin:0}@media(max-width:767px){._h1_1w27n_1{font-size:44px;line-height:44px;letter-spacing:-.01em}}
|
|
1
|
+
:root{--h-extra-desktop-font-size: 96px;--h-extra-desktop-line-height: 106px;--h-extra-desktop-letter-spacing: -.03em;--h1-desktop-font-size: 64px;--h1-desktop-line-height: 64px;--h1-desktop-letter-spacing: -.02em;--h2-desktop-font-size: 52px;--h2-desktop-line-height: 57px;--h2-desktop-letter-spacing: -.02em;--h3-desktop-font-size: 44px;--h3-desktop-line-height: 48px;--h3-desktop-letter-spacing: -.02em;--h4-desktop-font-size: 36px;--h4-desktop-line-height: 43px;--h4-desktop-letter-spacing: -.02em;--h5-desktop-font-size: 30px;--h5-desktop-line-height: 33px;--h5-desktop-letter-spacing: -.01em;--h6-desktop-font-size: 28px;--h6-desktop-line-height: 31px;--h6-desktop-letter-spacing: -.01em;--paragraph-desktop-font-size: 24px;--paragraph-desktop-line-height: 36px;--paragraph-desktop-letter-spacing: -.01em;--button-large-desktop-font-size: 20px;--button-large-desktop-line-height: 24px;--button-large-desktop-letter-spacing: -.02em;--body-large-desktop-font-size: 20px;--body-large-desktop-line-height: 30px;--body-large-desktop-letter-spacing: -.02em;--button-small-desktop-font-size: 17px;--button-small-desktop-line-height: 24px;--button-small-desktop-letter-spacing: -.02em;--body-small-desktop-font-size: 16px;--body-small-desktop-line-height: 24px;--body-small-desktop-letter-spacing: -.02em;--caption-large-desktop-font-size: 16px;--caption-large-desktop-line-height: 24px;--caption-large-desktop-letter-spacing: -.02em;--caption-medium-desktop-font-size: 12px;--caption-medium-desktop-line-height: 18px;--caption-medium-desktop-letter-spacing: -.02em;--caption-uppercase-desktop-font-size: 13px;--caption-uppercase-desktop-line-height: 16px;--caption-uppercase-desktop-letter-spacing: .04em;--code-desktop-font-size: 14px;--code-desktop-line-height: 17px;--code-desktop-letter-spacing: 0;--h-extra-tablet-font-size: 96px;--h-extra-tablet-line-height: 106px;--h-extra-tablet-letter-spacing: -.03em;--h1-tablet-font-size: 64px;--h1-tablet-line-height: 64px;--h1-tablet-letter-spacing: -.02em;--h2-tablet-font-size: 48px;--h2-tablet-line-height: 53px;--h2-tablet-letter-spacing: -.02em;--h3-tablet-font-size: 40px;--h3-tablet-line-height: 44px;--h3-tablet-letter-spacing: -.02em;--h4-tablet-font-size: 36px;--h4-tablet-line-height: 43px;--h4-tablet-letter-spacing: -.02em;--h5-tablet-font-size: 32px;--h5-tablet-line-height: 35px;--h5-tablet-letter-spacing: -.01em;--h6-tablet-font-size: 24px;--h6-tablet-line-height: 26px;--h6-tablet-letter-spacing: -.01em;--paragraph-tablet-font-size: 22px;--paragraph-tablet-line-height: 33px;--paragraph-tablet-letter-spacing: -.01em;--button-large-tablet-font-size: 18px;--button-large-tablet-line-height: 24px;--button-large-tablet-letter-spacing: -.02em;--body-large-tablet-font-size: 18px;--body-large-tablet-line-height: 27px;--body-large-tablet-letter-spacing: -.02em;--button-small-tablet-font-size: 16px;--button-small-tablet-line-height: 24px;--button-small-tablet-letter-spacing: -.02em;--body-small-tablet-font-size: 16px;--body-small-tablet-line-height: 24px;--body-small-tablet-letter-spacing: -.02em;--caption-large-tablet-font-size: 16px;--caption-large-tablet-line-height: 24px;--caption-large-tablet-letter-spacing: -.02em;--caption-medium-tablet-font-size: 12px;--caption-medium-tablet-line-height: 18px;--caption-medium-tablet-letter-spacing: -.02em;--caption-uppercase-tablet-font-size: 13px;--caption-uppercase-tablet-line-height: 16px;--caption-uppercase-tablet-letter-spacing: .04em;--code-tablet-font-size: 14px;--code-tablet-line-height: 17px;--code-tablet-letter-spacing: 0;--h-extra-mobile-font-size: 56px;--h-extra-mobile-line-height: 62px;--h-extra-mobile-letter-spacing: -.02em;--h1-mobile-font-size: 44px;--h1-mobile-line-height: 44px;--h1-mobile-letter-spacing: -.01em;--h2-mobile-font-size: 40px;--h2-mobile-line-height: 44px;--h2-mobile-letter-spacing: -.01em;--h3-mobile-font-size: 36px;--h3-mobile-line-height: 40px;--h3-mobile-letter-spacing: -.01em;--h4-mobile-font-size: 32px;--h4-mobile-line-height: 42px;--h4-mobile-letter-spacing: -.01em;--h5-mobile-font-size: 22px;--h5-mobile-line-height: 24px;--h5-mobile-letter-spacing: -.01em;--h6-mobile-font-size: 20px;--h6-mobile-line-height: 22px;--h6-mobile-letter-spacing: -.01em;--paragraph-mobile-font-size: 18px;--paragraph-mobile-line-height: 27px;--paragraph-mobile-letter-spacing: -.01em;--button-large-mobile-font-size: 16px;--button-large-mobile-line-height: 24px;--button-large-mobile-letter-spacing: -.01em;--body-large-mobile-font-size: 16px;--body-large-mobile-line-height: 24px;--body-large-mobile-letter-spacing: -.01em;--button-small-mobile-font-size: 14px;--button-small-mobile-line-height: 24px;--button-small-mobile-letter-spacing: -.01em;--body-small-mobile-font-size: 14px;--body-small-mobile-line-height: 21px;--body-small-mobile-letter-spacing: -.01em;--caption-large-mobile-font-size: 16px;--caption-large-mobile-line-height: 24px;--caption-large-mobile-letter-spacing: -.02em;--caption-medium-mobile-font-size: 12px;--caption-medium-mobile-line-height: 18px;--caption-medium-mobile-letter-spacing: -.02em;--caption-uppercase-mobile-font-size: 13px;--caption-uppercase-mobile-line-height: 16px;--caption-uppercase-mobile-letter-spacing: .04em;--code-mobile-font-size: 12px;--code-mobile-line-height: 17px;--code-mobile-letter-spacing: 0}._hExtra_dx1fb_1{font-family:var(--ui-font-primary);font-weight:600;font-size:var(--h-extra-desktop-font-size);line-height:var(--h-extra-desktop-line-height);letter-spacing:var(--h-extra-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:767px){._hExtra_dx1fb_1{font-size:var(--h-extra-mobile-font-size);line-height:var(--h-extra-mobile-line-height);letter-spacing:var(--h-extra-mobile-letter-spacing)}}._h1_iuejz_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--h1-desktop-font-size);line-height:var(--h1-desktop-line-height);letter-spacing:var(--h1-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:767px){._h1_iuejz_1{font-size:var(--h1-mobile-font-size);line-height:var(--h1-mobile-line-height);letter-spacing:var(--h1-mobile-letter-spacing)}}._h2_1i98w_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--h2-desktop-font-size);line-height:var(--h2-desktop-line-height);letter-spacing:var(--h2-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:1439px){._h2_1i98w_1{font-size:var(--h2-tablet-font-size);line-height:var(--h2-tablet-line-height)}}@media(max-width:767px){._h2_1i98w_1{font-size:var(--h2-mobile-font-size);line-height:var(--h2-mobile-line-height);letter-spacing:var(--h2-mobile-letter-spacing)}}._h3_wip1f_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--h3-desktop-font-size);line-height:var(--h3-desktop-line-height);letter-spacing:var(--h3-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:1439px){._h3_wip1f_1{font-size:var(--h3-tablet-font-size);line-height:var(--h3-tablet-line-height)}}@media(max-width:767px){._h3_wip1f_1{font-size:var(--h3-mobile-font-size);line-height:var(--h3-mobile-line-height);letter-spacing:var(--h3-mobile-letter-spacing)}}._h4_thwwf_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--h4-desktop-font-size);line-height:var(--h4-desktop-line-height);letter-spacing:var(--h4-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:767px){._h4_thwwf_1{font-size:var(--h4-mobile-font-size);line-height:var(--h4-mobile-line-height);letter-spacing:var(--h4-mobile-letter-spacing)}}._h5_zem0s_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--h5-desktop-font-size);line-height:var(--h5-desktop-line-height);letter-spacing:var(--h5-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:1439px){._h5_zem0s_1{font-size:var(--h5-tablet-font-size);line-height:var(--h5-tablet-line-height)}}@media(max-width:767px){._h5_zem0s_1{font-size:var(--h5-mobile-font-size);line-height:var(--h5-mobile-line-height)}}._h6_py9o3_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--h6-desktop-font-size);line-height:var(--h6-desktop-line-height);letter-spacing:var(--h6-desktop-letter-spacing);font-feature-settings:"dlig" 1,"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:1439px){._h6_py9o3_1{font-size:var(--h6-tablet-font-size);line-height:var(--h6-tablet-line-height)}}@media(max-width:767px){._h6_py9o3_1{font-size:var(--h6-mobile-font-size);line-height:var(--h6-mobile-line-height)}}._paragraph_6mdxp_1{font-family:var(--ui-font-primary);font-weight:500;font-size:var(--paragraph-desktop-font-size);line-height:var(--paragraph-desktop-line-height);letter-spacing:var(--paragraph-desktop-letter-spacing);font-feature-settings:"ss01" 1,"ss02" 1,"ss04" 1;margin:0}@media(max-width:1439px){._paragraph_6mdxp_1{font-size:var(--paragraph-tablet-font-size);line-height:var(--paragraph-tablet-line-height)}}@media(max-width:767px){._paragraph_6mdxp_1{font-size:var(--paragraph-mobile-font-size);line-height:var(--paragraph-mobile-line-height)}}._bodyLarge_zgxpr_1{font-family:var(--ui-font-primary);font-weight:400;font-size:var(--body-large-desktop-font-size);line-height:var(--body-large-desktop-line-height);letter-spacing:var(--body-large-desktop-letter-spacing);font-feature-settings:"dlig" 1;margin:0}@media(max-width:1439px){._bodyLarge_zgxpr_1{font-size:var(--body-large-tablet-font-size);line-height:var(--body-large-tablet-line-height)}}@media(max-width:767px){._bodyLarge_zgxpr_1{font-size:var(--body-large-mobile-font-size);line-height:var(--body-large-mobile-line-height);letter-spacing:var(--body-large-mobile-letter-spacing)}}._bodySmall_izgxi_1{font-family:var(--ui-font-primary);font-weight:400;font-size:var(--body-small-desktop-font-size);line-height:var(--body-small-desktop-line-height);letter-spacing:var(--body-small-desktop-letter-spacing);font-feature-settings:"dlig" 1;margin:0}@media(max-width:767px){._bodySmall_izgxi_1{font-size:var(--body-small-mobile-font-size);line-height:var(--body-small-mobile-line-height);letter-spacing:var(--body-small-mobile-letter-spacing)}}._buttonLarge_hwbzl_1{font-family:Inter,sans-serif;font-weight:500;font-size:var(--button-large-desktop-font-size);line-height:var(--button-large-desktop-line-height);letter-spacing:var(--button-large-desktop-letter-spacing);font-feature-settings:"dlig" 1}@media(max-width:1439px){._buttonLarge_hwbzl_1{font-size:var(--button-large-tablet-font-size)}}@media(max-width:767px){._buttonLarge_hwbzl_1{font-family:var(--ui-font-primary);font-size:var(--button-large-mobile-font-size);letter-spacing:var(--button-large-mobile-letter-spacing)}}._buttonSmall_1psts_1{font-family:Inter,sans-serif;font-weight:500;font-size:var(--button-small-desktop-font-size);line-height:var(--button-small-desktop-line-height);letter-spacing:var(--button-small-desktop-letter-spacing);font-feature-settings:"dlig" 1}@media(max-width:1439px){._buttonSmall_1psts_1{font-size:var(--button-small-tablet-font-size)}}@media(max-width:767px){._buttonSmall_1psts_1{font-family:var(--ui-font-primary);font-size:var(--button-small-mobile-font-size);letter-spacing:var(--button-small-mobile-letter-spacing)}}._captionLarge_lev6r_1{font-family:Inter,sans-serif;font-weight:500;font-size:var(--caption-large-desktop-font-size);line-height:var(--caption-large-desktop-line-height);letter-spacing:var(--caption-large-desktop-letter-spacing);font-feature-settings:"dlig" 1}@media(max-width:767px){._captionLarge_lev6r_1{font-family:var(--ui-font-primary)}}._captionMedium_1gxrg_1{font-family:Inter,sans-serif;font-weight:400;font-size:var(--caption-medium-desktop-font-size);line-height:var(--caption-medium-desktop-line-height);letter-spacing:var(--caption-medium-desktop-letter-spacing);font-feature-settings:"dlig" 1}@media(max-width:767px){._captionMedium_1gxrg_1{font-family:var(--ui-font-primary)}}._captionUppercase_1mzfy_1{font-family:Inter,sans-serif;font-weight:400;font-size:var(--caption-uppercase-desktop-font-size);line-height:var(--caption-uppercase-desktop-line-height);letter-spacing:var(--caption-uppercase-desktop-letter-spacing);font-feature-settings:"dlig" 1;text-transform:uppercase}@media(max-width:767px){._captionUppercase_1mzfy_1{font-family:var(--ui-font-primary)}}._code_1to1m_1{font-family:Hack,monospace;font-weight:400;font-size:var(--code-desktop-font-size);line-height:var(--code-desktop-line-height);letter-spacing:var(--code-desktop-letter-spacing);font-feature-settings:"dlig" 1}@media(max-width:767px){._code_1to1m_1{font-size:var(--code-mobile-font-size)}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartyweb/ui",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"
|
|
20
|
+
"tokens": "node sd.config.js",
|
|
21
|
+
"build": "node sd.config.js && vite build",
|
|
21
22
|
"typecheck": "tsc --noEmit",
|
|
22
23
|
"changeset": "changeset",
|
|
23
24
|
"release": "changeset publish",
|
|
24
|
-
"storybook": "storybook dev -p 6006",
|
|
25
|
+
"storybook": "node sd.config.js && storybook dev -p 6006",
|
|
25
26
|
"build-storybook": "storybook build"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@changesets/cli": "^2.29.8",
|
|
33
|
-
"@storybook/react-vite": "^10.2.
|
|
34
|
+
"@storybook/react-vite": "^10.2.15",
|
|
34
35
|
"@types/react": "^19.2.13",
|
|
35
36
|
"@types/react-dom": "^19.2.3",
|
|
36
37
|
"@vitejs/plugin-react": "^5.1.3",
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
"react": "^19.2.4",
|
|
39
40
|
"react-dom": "^19.2.4",
|
|
40
41
|
"sass": "^1.97.3",
|
|
41
|
-
"storybook": "^10.2.
|
|
42
|
+
"storybook": "^10.2.15",
|
|
43
|
+
"style-dictionary": "^4.4.0",
|
|
42
44
|
"typescript": "^5.9.3",
|
|
43
45
|
"vite": "^7.3.1",
|
|
44
46
|
"vite-plugin-dts": "^4.5.4"
|