@contentstudio/ui 0.2.29 → 0.2.30-rc.33

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 CHANGED
@@ -8,6 +8,7 @@ Vue component library and theme tooling for ContentStudio.
8
8
  pnpm install
9
9
  pnpm build:watch
10
10
  pnpm dev:docs
11
+ pnpm tokens:pen # regenerate Pen tokens after updating tokens/pen/figma-variables.json
11
12
  ```
12
13
 
13
14
  ## Package Usage
@@ -21,15 +22,20 @@ import { Button } from '@contentstudio/ui'
21
22
 
22
23
  ### Tailwind v4 Consumer Setup
23
24
 
24
- For consumer-generated CSTU utilities like `bg-cstu-primary-500`, import the package theme adapter in your app CSS:
25
+ Import both theme adapters in your app CSS: `theme.css` for the legacy CSTU colour utilities (`bg-cstu-primary-500`), `pen-theme.css` for the Pen utilities (`bg-fill-brand`, `text-content-secondary`, `p-pen-4`, `text-heading-sm`, `shadow-elevation-md`, …):
25
26
 
26
27
  ```css
27
28
  @import "tailwindcss";
28
29
  @import "@contentstudio/ui/theme.css";
30
+ @import "@contentstudio/ui/pen-theme.css";
29
31
  ```
30
32
 
33
+ The adapters only declare utilities; the values come from `@contentstudio/ui/dist/style.css`, which includes the Pen variables (`pen-tokens.css`, also exported on its own). Load it once, as above.
34
+
31
35
  This is the primary integration path for Tailwind v4 consumers.
32
36
 
37
+ Pen dark mode is opt-in: `<ThemeProvider dark-strategy="pen">` sets `data-theme="dark"`, and the Pen semantic utilities switch with it.
38
+
33
39
  ### Runtime Theme Updates
34
40
 
35
41
  The compiled component CSS already includes the default runtime variables. To override them dynamically:
@@ -41,6 +47,8 @@ const palette = generatePalette({ primary: '#ff0066' })
41
47
  applyTheme(palette)
42
48
  ```
43
49
 
50
+ A custom primary also writes the Pen `--brand-*` scale, so `fill-brand`, `content-brand` and the components follow it.
51
+
44
52
  If you are using SSR, generate and inline the variables during rendering to avoid FOUC.
45
53
 
46
54
  Tailwind integration is CSS-first in v4. Consumer apps should use `@contentstudio/ui/theme.css`, not a JS Tailwind config adapter.
@@ -0,0 +1,28 @@
1
+ @solar-icons/vue
2
+
3
+ MIT License
4
+
5
+ Copyright (c) 2024 Hakim Saoudi
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ The Software may include icons that are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0). Commercial use is allowed, but attribution is required for the use of these icons. See LICENSE-THIRD-PARTY for more details.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ THIRD-PARTY LICENSES
16
+
17
+ This project includes icons that are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
18
+
19
+ Attribution Requirement:
20
+ You are allowed to use these icons for commercial and non-commercial purposes, but you must give appropriate credit as required by the CC BY 4.0 license.
21
+
22
+ For more details, please visit: https://creativecommons.org/licenses/by/4.0/
23
+
24
+ List of Third-Party Elements:
25
+ - **Solar Icons Set** By [480 Design](https://www.figma.com/community/file/1166831539721848736)
26
+
27
+ Attribution Instructions:
28
+ When using the icons, please attribute the original authors in a visible way according to the terms of the CC BY 4.0 license.