create-quilltap-theme 2.0.9 → 2.0.11
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/dist/index.js
CHANGED
|
@@ -123,6 +123,24 @@ async function scaffoldBundle(config) {
|
|
|
123
123
|
"utf-8"
|
|
124
124
|
);
|
|
125
125
|
success("Created fonts/");
|
|
126
|
+
const iconsDir = path.join(destPath, "icons");
|
|
127
|
+
fs.mkdirSync(iconsDir, { recursive: true });
|
|
128
|
+
fs.writeFileSync(
|
|
129
|
+
path.join(iconsDir, ".gitkeep"),
|
|
130
|
+
[
|
|
131
|
+
"# Place icon override assets here (.svg or .webp) and map them in theme.json:",
|
|
132
|
+
"#",
|
|
133
|
+
'# "icons": {',
|
|
134
|
+
'# "settings": "icons/settings.svg", // .svg keeps currentColor tinting',
|
|
135
|
+
'# "brand": "icons/brand.webp" // .webp bakes in its own color',
|
|
136
|
+
"# }",
|
|
137
|
+
"#",
|
|
138
|
+
"# Icon names must match Quilltap's built-in icon names. Unmatched names are ignored.",
|
|
139
|
+
""
|
|
140
|
+
].join("\n"),
|
|
141
|
+
"utf-8"
|
|
142
|
+
);
|
|
143
|
+
success("Created icons/");
|
|
126
144
|
heading("Done! Next steps:");
|
|
127
145
|
log(` ${colors.dim}# Edit your theme:${colors.reset}`);
|
|
128
146
|
log(` ${colors.cyan}cd ${config.themeId}${colors.reset}`);
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ This is a `.qtap-theme` bundle — a simple directory (or zip archive) containin
|
|
|
14
14
|
├── tokens.json # Design tokens (colors, typography, spacing, effects)
|
|
15
15
|
├── styles.css # CSS overrides (optional)
|
|
16
16
|
├── fonts/ # Custom font files (optional)
|
|
17
|
+
├── icons/ # Icon override assets (optional)
|
|
17
18
|
└── README.md # This file
|
|
18
19
|
```
|
|
19
20
|
|
|
@@ -24,6 +25,29 @@ This is a `.qtap-theme` bundle — a simple directory (or zip archive) containin
|
|
|
24
25
|
- **Spacing/Radius**: Edit `tokens.json` → `spacing` section
|
|
25
26
|
- **Component styles**: Edit `styles.css` for custom CSS overrides
|
|
26
27
|
- **Custom fonts**: Add `.woff2` files to `fonts/` and reference them in `theme.json`
|
|
28
|
+
- **Custom icons**: Add `.svg` or `.webp` files to `icons/` and map them in `theme.json` (see below)
|
|
29
|
+
|
|
30
|
+
## Custom icons
|
|
31
|
+
|
|
32
|
+
Quilltap renders its UI icons through a central registry, so a theme can replace
|
|
33
|
+
any of them. Drop replacement assets into `icons/` and add an `icons` map to
|
|
34
|
+
`theme.json`, keyed by Quilltap's built-in icon name:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"icons": {
|
|
39
|
+
"settings": "icons/settings.svg",
|
|
40
|
+
"brand": "icons/brand.webp"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- **`.svg` overrides** are tinted by the current text color, exactly like the
|
|
46
|
+
built-in icons — good for monochrome glyphs that should follow the theme.
|
|
47
|
+
- **`.webp` overrides** are drawn in full color — good for textured or
|
|
48
|
+
multi-color marks (the `brand` quill is always drawn in full color).
|
|
49
|
+
- Icon names must match Quilltap's built-in names; unknown names are ignored.
|
|
50
|
+
Run `quilltap themes validate` to catch typos and bad asset paths.
|
|
27
51
|
|
|
28
52
|
## Installing
|
|
29
53
|
|
|
@@ -120,6 +120,23 @@
|
|
|
120
120
|
/* --qt-input-placeholder: var(--color-muted-foreground); */
|
|
121
121
|
/* --qt-input-focus-ring: var(--color-ring); */
|
|
122
122
|
/* --qt-input-transition: colors 150ms cubic-bezier(0.4, 0, 0.2, 1); */
|
|
123
|
+
/* Select chevron — a full url() data URI; swap the whole glyph to restyle it. */
|
|
124
|
+
/* --qt-select-arrow: url("data:image/svg+xml,..."); */
|
|
125
|
+
|
|
126
|
+
/* ======================================================================
|
|
127
|
+
CHECKBOX & RADIO VARIABLES
|
|
128
|
+
accent-color recolors the native fill/check; size/border/radius apply
|
|
129
|
+
to appearance:none controls.
|
|
130
|
+
====================================================================== */
|
|
131
|
+
/* --qt-checkbox-size: 1rem; */
|
|
132
|
+
/* --qt-checkbox-radius: var(--radius-sm); */
|
|
133
|
+
/* --qt-checkbox-border: var(--color-border); */
|
|
134
|
+
/* --qt-checkbox-accent: var(--color-primary); */
|
|
135
|
+
/* --qt-checkbox-focus-ring: var(--color-ring); */
|
|
136
|
+
/* --qt-radio-size: 1rem; */
|
|
137
|
+
/* --qt-radio-border: var(--color-border); */
|
|
138
|
+
/* --qt-radio-accent: var(--color-primary); */
|
|
139
|
+
/* --qt-radio-focus-ring: var(--color-ring); */
|
|
123
140
|
|
|
124
141
|
/* ======================================================================
|
|
125
142
|
NAVBAR VARIABLES
|
|
@@ -594,8 +594,24 @@ Override these variables for consistent component styling:
|
|
|
594
594
|
--qt-input-radius
|
|
595
595
|
--qt-input-padding-y
|
|
596
596
|
--qt-input-padding-x
|
|
597
|
+
--qt-input-bg
|
|
598
|
+
--qt-input-fg
|
|
597
599
|
--qt-input-border
|
|
600
|
+
--qt-input-placeholder
|
|
601
|
+
--qt-input-focus-ring
|
|
598
602
|
--qt-input-transition
|
|
603
|
+
--qt-select-arrow /* full url() data URI for the <select> chevron */
|
|
604
|
+
|
|
605
|
+
/* Checkboxes & radios (accent-color is the fill/check hook) */
|
|
606
|
+
--qt-checkbox-size
|
|
607
|
+
--qt-checkbox-radius
|
|
608
|
+
--qt-checkbox-border
|
|
609
|
+
--qt-checkbox-accent
|
|
610
|
+
--qt-checkbox-focus-ring
|
|
611
|
+
--qt-radio-size
|
|
612
|
+
--qt-radio-border
|
|
613
|
+
--qt-radio-accent
|
|
614
|
+
--qt-radio-focus-ring
|
|
599
615
|
|
|
600
616
|
/* Badges */
|
|
601
617
|
--qt-badge-radius
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import {
|
|
4
4
|
ColorPalette,
|
|
5
|
+
Icons,
|
|
5
6
|
Typography,
|
|
6
7
|
Spacing,
|
|
7
8
|
Buttons,
|
|
@@ -23,6 +24,12 @@ export const Colors: StoryObj = {
|
|
|
23
24
|
render: () => <ColorPalette />,
|
|
24
25
|
};
|
|
25
26
|
|
|
27
|
+
// Icons
|
|
28
|
+
export const IconReference: StoryObj = {
|
|
29
|
+
name: 'Icons',
|
|
30
|
+
render: () => <Icons />,
|
|
31
|
+
};
|
|
32
|
+
|
|
26
33
|
// Typography
|
|
27
34
|
export const Fonts: StoryObj = {
|
|
28
35
|
name: 'Typography',
|