@youngonesworks/ui 0.1.125 → 0.1.127
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 +1 -35
- package/dist/foundation/typography/Typography.stories.d.ts +5 -0
- package/dist/globals.css +2 -0
- package/dist/index.cjs +0 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -29
- package/dist/index.js.map +1 -1
- package/dist/styles/index.d.ts +3 -0
- package/dist/styles/utilities.css +24 -154
- package/dist/styles/variables.css +54 -42
- package/package.json +1 -1
- package/dist/theme/index.d.ts +0 -4
- package/dist/theme/variables.d.ts +0 -62
package/README.md
CHANGED
|
@@ -88,36 +88,6 @@ function App() {
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
#### TypeScript CSS Variable Helpers
|
|
92
|
-
|
|
93
|
-
```tsx
|
|
94
|
-
import {
|
|
95
|
-
getCSSVariable,
|
|
96
|
-
setCSSVariable,
|
|
97
|
-
type CSSVariables,
|
|
98
|
-
} from "@youngonesworks/ui/theme";
|
|
99
|
-
|
|
100
|
-
// Get CSS variable values
|
|
101
|
-
const primaryColor = getCSSVariable("--color-primary");
|
|
102
|
-
const fontSize = getCSSVariable("--font-lg-size");
|
|
103
|
-
|
|
104
|
-
// Set CSS variables dynamically
|
|
105
|
-
setCSSVariable("--color-primary", "#ff6b35");
|
|
106
|
-
setCSSVariable("--font-lg-size", "1.25rem");
|
|
107
|
-
|
|
108
|
-
// Type-safe variable names
|
|
109
|
-
const variables: CSSVariables = {
|
|
110
|
-
colors: {
|
|
111
|
-
primary: "#10d1bb",
|
|
112
|
-
secondary: "#6366f1",
|
|
113
|
-
},
|
|
114
|
-
typography: {
|
|
115
|
-
fontLgSize: "1.125rem",
|
|
116
|
-
fontBaseLine: "1.5rem",
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
```
|
|
120
|
-
|
|
121
91
|
### 🔤 Next.js Fonts
|
|
122
92
|
|
|
123
93
|
#### Setup in Next.js App Router
|
|
@@ -171,9 +141,6 @@ export default function RootLayout({ children }) {
|
|
|
171
141
|
// Components
|
|
172
142
|
import { Button, Card, Input } from "@youngonesworks/ui";
|
|
173
143
|
|
|
174
|
-
// CSS Variables (TypeScript helpers)
|
|
175
|
-
import { getCSSVariable, setCSSVariable } from "@youngonesworks/ui/theme";
|
|
176
|
-
|
|
177
144
|
// CSS files (import in CSS/SCSS)
|
|
178
145
|
// @import '@youngonesworks/ui/styles/variables.css';
|
|
179
146
|
// @import '@youngonesworks/ui/styles/utilities.css';
|
|
@@ -281,8 +248,7 @@ Contributions are welcome! Please follow these guidelines:
|
|
|
281
248
|
When adding new CSS variables:
|
|
282
249
|
|
|
283
250
|
1. Add them to `src/styles/variables.css`
|
|
284
|
-
2.
|
|
285
|
-
3. Document them in this README
|
|
251
|
+
2. Document them in this README
|
|
286
252
|
|
|
287
253
|
## License
|
|
288
254
|
|
package/dist/globals.css
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -3617,34 +3617,6 @@ const WysiwygEditor = (0, react.forwardRef)(({ id, content, className, placehold
|
|
|
3617
3617
|
})] });
|
|
3618
3618
|
});
|
|
3619
3619
|
|
|
3620
|
-
//#endregion
|
|
3621
|
-
//#region src/theme/variables.ts
|
|
3622
|
-
const CSS_VARIABLE_KEYS = [
|
|
3623
|
-
"--color-primary",
|
|
3624
|
-
"--color-primary-light",
|
|
3625
|
-
"--color-primary-dark",
|
|
3626
|
-
"--color-black",
|
|
3627
|
-
"--color-navy-blue",
|
|
3628
|
-
"--color-white",
|
|
3629
|
-
"--color-accent-blue",
|
|
3630
|
-
"--color-ultra-light-blue",
|
|
3631
|
-
"--color-green",
|
|
3632
|
-
"--color-green-light",
|
|
3633
|
-
"--color-secondary",
|
|
3634
|
-
"--color-purple",
|
|
3635
|
-
"--color-orange",
|
|
3636
|
-
"--color-warning",
|
|
3637
|
-
"--color-warning-light",
|
|
3638
|
-
"--color-warning-dark"
|
|
3639
|
-
];
|
|
3640
|
-
const getCSSVariable = (variable) => {
|
|
3641
|
-
if (typeof window !== "undefined") return getComputedStyle(document.documentElement).getPropertyValue(variable).trim();
|
|
3642
|
-
return "";
|
|
3643
|
-
};
|
|
3644
|
-
const setCSSVariable = (variable, value) => {
|
|
3645
|
-
if (typeof window !== "undefined") document.documentElement.style.setProperty(variable, value);
|
|
3646
|
-
};
|
|
3647
|
-
|
|
3648
3620
|
//#endregion
|
|
3649
3621
|
exports.AccordionItem = AccordionItem;
|
|
3650
3622
|
exports.AccordionWrapper = AccordionWrapper;
|
|
@@ -3658,7 +3630,6 @@ exports.Badge = Badge;
|
|
|
3658
3630
|
exports.BigBadge = BigBadge;
|
|
3659
3631
|
exports.BreadCrumb = BreadCrumb;
|
|
3660
3632
|
exports.Button = Button;
|
|
3661
|
-
exports.CSS_VARIABLE_KEYS = CSS_VARIABLE_KEYS;
|
|
3662
3633
|
exports.Checkbox = Checkbox;
|
|
3663
3634
|
exports.DatePickerInput = DatePickerInput;
|
|
3664
3635
|
exports.Divider = Divider;
|
|
@@ -3714,6 +3685,4 @@ exports.UnorderedListItem = UnorderedListItem;
|
|
|
3714
3685
|
exports.UnstyledButton = UnstyledButton;
|
|
3715
3686
|
exports.WysiwygEditor = WysiwygEditor;
|
|
3716
3687
|
exports.buttonVariants = buttonVariants;
|
|
3717
|
-
exports.getCSSVariable = getCSSVariable;
|
|
3718
|
-
exports.setCSSVariable = setCSSVariable;
|
|
3719
3688
|
//# sourceMappingURL=index.cjs.map
|