@codenhub/styles 0.7.0 → 0.9.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.es.md +9 -8
- package/README.md +8 -7
- package/README.pt-BR.md +9 -8
- package/dist/aesthetics/chunky-tile.css +1 -1
- package/dist/aesthetics/cyber.css +1 -1
- package/dist/aesthetics/glass.css +1 -1
- package/dist/aesthetics/index.css +2 -2
- package/dist/aesthetics/neobrutalism.css +1 -1
- package/dist/aesthetics/pixel.css +1 -1
- package/dist/aesthetics/sketch.css +1 -1
- package/dist/cli.js +358 -0
- package/dist/components.css +50 -2
- package/dist/index.css +50 -2
- package/dist/index.d.ts +1 -0
- package/dist/native.css +50 -2
- package/dist/palette.css +1 -1
- package/dist/purge/classes.json +1 -0
- package/dist/purge/index.css +50 -0
- package/dist/theme.css +2 -2
- package/docs/accessibility.md +46 -27
- package/docs/changelog/0.8.0.md +70 -0
- package/docs/changelog/0.9.0.md +40 -0
- package/docs/changelog/index.md +2 -0
- package/docs/es/accessibility.md +47 -28
- package/docs/es/index.md +4 -3
- package/docs/es/integrating/index.md +38 -10
- package/docs/es/integrating/tailwind.md +79 -8
- package/docs/es/integrating/without-a-bundler.md +157 -5
- package/docs/es/setup.md +43 -34
- package/docs/es/usage/aesthetics.md +20 -14
- package/docs/es/usage/buttons.md +6 -2
- package/docs/es/usage/composing.md +6 -2
- package/docs/es/usage/content-and-layout.md +10 -4
- package/docs/es/usage/customizing.md +46 -26
- package/docs/es/usage/feedback.md +5 -1
- package/docs/es/usage/forms.md +30 -5
- package/docs/es/usage/index.md +7 -3
- package/docs/es/usage/presets.md +92 -0
- package/docs/es/usage/solo.md +4 -2
- package/docs/es/usage/theming.md +29 -16
- package/docs/es/usage/tooltips.md +2 -2
- package/docs/index.md +3 -2
- package/docs/integrating/index.md +38 -10
- package/docs/integrating/tailwind.md +78 -7
- package/docs/integrating/without-a-bundler.md +156 -4
- package/docs/pt-BR/accessibility.md +47 -28
- package/docs/pt-BR/index.md +4 -3
- package/docs/pt-BR/integrating/index.md +38 -10
- package/docs/pt-BR/integrating/tailwind.md +79 -8
- package/docs/pt-BR/integrating/without-a-bundler.md +157 -5
- package/docs/pt-BR/setup.md +43 -34
- package/docs/pt-BR/usage/aesthetics.md +20 -14
- package/docs/pt-BR/usage/buttons.md +6 -2
- package/docs/pt-BR/usage/composing.md +6 -2
- package/docs/pt-BR/usage/content-and-layout.md +10 -4
- package/docs/pt-BR/usage/customizing.md +46 -26
- package/docs/pt-BR/usage/feedback.md +5 -1
- package/docs/pt-BR/usage/forms.md +30 -5
- package/docs/pt-BR/usage/index.md +7 -3
- package/docs/pt-BR/usage/presets.md +92 -0
- package/docs/pt-BR/usage/solo.md +4 -2
- package/docs/pt-BR/usage/theming.md +22 -9
- package/docs/pt-BR/usage/tooltips.md +2 -2
- package/docs/setup.md +31 -22
- package/docs/usage/aesthetics.md +19 -13
- package/docs/usage/buttons.md +5 -1
- package/docs/usage/composing.md +5 -1
- package/docs/usage/content-and-layout.md +9 -3
- package/docs/usage/customizing.md +45 -25
- package/docs/usage/feedback.md +4 -0
- package/docs/usage/forms.md +29 -4
- package/docs/usage/index.md +6 -2
- package/docs/usage/presets.md +91 -0
- package/docs/usage/solo.md +3 -1
- package/docs/usage/theming.md +21 -8
- package/docs/usage/tooltips.md +1 -1
- package/llms-full.txt +695 -134
- package/llms.txt +3 -2
- package/package.json +117 -65
- package/{dist/tw → tw}/aesthetics/chunky-tile.css +43 -20
- package/{dist/tw → tw}/aesthetics/cyber.css +19 -25
- package/{dist/tw → tw}/aesthetics/glass.css +110 -36
- package/{dist/tw → tw}/aesthetics/neobrutalism.css +41 -21
- package/{dist/tw → tw}/aesthetics/pixel.css +3 -0
- package/tw/aesthetics/sketch.css +435 -0
- package/{dist/tw → tw}/box.css +109 -26
- package/tw/components/button.css +11 -0
- package/tw/components/button.rules.css +187 -0
- package/tw/components/feedback.css +11 -0
- package/{dist/tw/components/feedback.css → tw/components/feedback.rules.css} +156 -33
- package/tw/components/form.css +11 -0
- package/{dist/tw/components/form.css → tw/components/form.rules.css} +584 -141
- package/tw/components/index.css +16 -0
- package/tw/components/rules.css +41 -0
- package/tw/components/surface.css +11 -0
- package/tw/components/surface.rules.css +225 -0
- package/tw/components/tooltip.css +11 -0
- package/{dist/tw/components/tooltip.css → tw/components/tooltip.rules.css} +82 -61
- package/{dist/tw → tw}/corner.css +18 -12
- package/{dist/tw → tw}/elevation.css +27 -21
- package/{dist/tw → tw}/index.css +11 -9
- package/tw/index.d.ts +1 -0
- package/tw/intent.css +312 -0
- package/tw/modifiers.css +127 -0
- package/tw/native.css +323 -0
- package/tw/presentation.css +139 -0
- package/tw/reset.css +10 -0
- package/{dist/tw/reset.css → tw/reset.rules.css} +7 -8
- package/tw/size.css +34 -0
- package/tw/surface.css +9 -0
- package/tw/surface.rules.css +212 -0
- package/{dist/tw → tw}/theme.css +93 -29
- package/tw/typography.css +8 -0
- package/{dist/tw/typography.css → tw/typography.rules.css} +0 -3
- package/{dist/tw → tw}/utilities/content.css +248 -108
- package/tw/utilities/index.css +11 -0
- package/tw/utilities/layout.css +210 -0
- package/tw/utilities/rules.css +8 -0
- package/dist/tw/aesthetics/sketch.css +0 -398
- package/dist/tw/components/button.css +0 -139
- package/dist/tw/components/index.css +0 -35
- package/dist/tw/components/surface.css +0 -184
- package/dist/tw/intent.css +0 -229
- package/dist/tw/native.css +0 -203
- package/dist/tw/palette.css +0 -460
- package/dist/tw/presentation.css +0 -68
- package/dist/tw/surface.css +0 -61
- package/dist/tw/utilities/index.css +0 -6
- package/dist/tw/utilities/layout.css +0 -144
- /package/{dist/tw → tw}/aesthetics/index.css +0 -0
package/dist/tw/presentation.css
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/* Imported into the `components` layer by `theme.css`, below every utility, so
|
|
2
|
-
a consumer's own utility or unlayered CSS beats these classes. See
|
|
3
|
-
docs/internal/model.md#cascade-layers. */
|
|
4
|
-
|
|
5
|
-
/* Presentation answers two independent questions, and each is its own closed
|
|
6
|
-
set: how much of the intent color fills the box, and whether the box draws a
|
|
7
|
-
line at its boundary. Exactly one value from each set applies, so the six
|
|
8
|
-
combinations are the whole vocabulary.
|
|
9
|
-
|
|
10
|
-
A fill class never decides an edge and an edge class never decides a fill, so
|
|
11
|
-
each half means only what it says. The line fades toward `transparent` as the
|
|
12
|
-
fill fills in (`box.css`; docs/internal/model.md#presentation), so
|
|
13
|
-
`.solid.edged` and `.solid.edgeless` render one box without either class
|
|
14
|
-
deciding the other's question.
|
|
15
|
-
|
|
16
|
-
Presentation declares only unitless numbers and percentages. A custom
|
|
17
|
-
property's value is resolved on the element that declares it, so anything
|
|
18
|
-
referencing an intent token here would resolve against the container's intent
|
|
19
|
-
and inherit down already-resolved. Numbers carry no intent, so they inherit
|
|
20
|
-
safely and each component mixes them against its own palette.
|
|
21
|
-
|
|
22
|
-
A declaration on the element beats an inherited one, which is what lets a
|
|
23
|
-
container set the look for its subtree while any element still opts out.
|
|
24
|
-
|
|
25
|
-
Hover is derived from these values rather than declared beside them:
|
|
26
|
-
`min(100%, resting fill + --hover-step)`, always in `--intent-hover`. There
|
|
27
|
-
is no hover token and no per-presentation branch. */
|
|
28
|
-
|
|
29
|
-
/* Filled with the intent color. Text is the contrast tone. */
|
|
30
|
-
.solid {
|
|
31
|
-
--ui-fill: 100%;
|
|
32
|
-
--ui-fg-on-fill: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Tinted with the intent color. Text is the intent color. */
|
|
36
|
-
.soft {
|
|
37
|
-
--ui-fill: 12%;
|
|
38
|
-
--ui-fg-on-fill: 0%;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* No fill at rest; the derived hover gives it one. Text is the intent color. It
|
|
42
|
-
names a fill and only a fill: `.bare` and `.edgeless` both read as "less of
|
|
43
|
-
something", so an author wanting no border would reach for the wrong one.
|
|
44
|
-
|
|
45
|
-
A component that rests on a ground rather than on nothing keeps that ground
|
|
46
|
-
here: `.ghost` is zero fill, not zero paint. `.data-table` is the exception
|
|
47
|
-
that proves it -- its head plate *is* the tint, so a ghost table drops it. */
|
|
48
|
-
.ghost {
|
|
49
|
-
--ui-fill: 0%;
|
|
50
|
-
--ui-fg-on-fill: 0%;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* A line in the intent color, at the aesthetic's material width. The width
|
|
54
|
-
comes from the aesthetic and nothing else: there is no presentation scale on
|
|
55
|
-
it, so small components need no ceilings to survive a thick one.
|
|
56
|
-
|
|
57
|
-
The edge is the silhouette and nothing else. Rules *inside* a component that
|
|
58
|
-
has an inside are a separate decision with their own class --
|
|
59
|
-
`.data-table.ruled` -- so a consumer's own markup says whether they asked for
|
|
60
|
-
them. */
|
|
61
|
-
.edged {
|
|
62
|
-
--ui-border: 100%;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* No line. */
|
|
66
|
-
.edgeless {
|
|
67
|
-
--ui-border: 0%;
|
|
68
|
-
}
|
package/dist/tw/surface.css
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
@reference "./box.css";
|
|
2
|
-
|
|
3
|
-
/* What every surface shares. Two slots exist here and nowhere else, and that is
|
|
4
|
-
how an aesthetic reaches surfaces without naming one: only a surface resolves
|
|
5
|
-
`--ui-backdrop`, so glass blurs cards and panels while controls stay solid,
|
|
6
|
-
and only a surface resolves `--ui-surface-shadow`, so a two-layer drop shadow
|
|
7
|
-
does not land under every button on the page.
|
|
8
|
-
|
|
9
|
-
A primitive beside `box`, and like `box` it imports neither the theme nor
|
|
10
|
-
Tailwind: `feedback.css` and `tooltip.css` `@reference` it, and a referenced
|
|
11
|
-
file that reaches the theme strips its tokens from every entry that pulls it
|
|
12
|
-
in. See docs/internal/model.md (Which files import the theme). */
|
|
13
|
-
@utility surface {
|
|
14
|
-
@apply box block;
|
|
15
|
-
|
|
16
|
-
/* Bare and edged. `box` reads these three with no fallback, so `surface` --
|
|
17
|
-
typeable on its own -- owes all three; `card` restates its own. No shadow
|
|
18
|
-
geometry: depth is asked for (`.raised`/`.floating`, an aesthetic, the
|
|
19
|
-
registry elevation) rather than carried, so a plain card is flat. */
|
|
20
|
-
--_d-fill: 0%;
|
|
21
|
-
--_d-fg-on-fill: 0%;
|
|
22
|
-
--_d-border: 100%;
|
|
23
|
-
|
|
24
|
-
/* The public token first, so an aesthetic (glass's translucent ground) or a
|
|
25
|
-
consumer names the ground outright; then the component's own quiet default,
|
|
26
|
-
which `.card.soft`, a neutral `.panel`, and a neutral `.alert` write as a
|
|
27
|
-
private rather than as the public token. Written as the public token, their
|
|
28
|
-
own declaration would beat glass's inherited one in a glass region, and
|
|
29
|
-
beat glass on the same element too (`.card.soft.glass` would go opaque).
|
|
30
|
-
Restated `initial` here so a quiet ground cannot inherit into a surface
|
|
31
|
-
nested inside one, the way `box` restates `--_d-ground`. See
|
|
32
|
-
docs/internal/model.md#cascade-layers. */
|
|
33
|
-
--_d-surface-ground: initial;
|
|
34
|
-
--_d-ground: var(--ui-surface-ground, var(--_d-surface-ground, var(--color-background)));
|
|
35
|
-
|
|
36
|
-
/* The complete-shadow slot for a shadow that is not one layer (glass tucks two
|
|
37
|
-
under with negative spread). Only `surface` reads it -- through `--ui-shadow`
|
|
38
|
-
it would land an 18px drop under every button and chip -- like the backdrop. */
|
|
39
|
-
--_shadow: var(--ui-surface-shadow, var(--_shadow-parts)) var(--_halo-layer,);
|
|
40
|
-
|
|
41
|
-
/* The surface pair of `box`'s corner: the aesthetic's surface length, scaled
|
|
42
|
-
by the padding step and patterned by the same four corner switches. */
|
|
43
|
-
--_corner-surface: calc(var(--ui-corner-surface, var(--radius-surface)) * var(--_scale));
|
|
44
|
-
border-radius: var(
|
|
45
|
-
--ui-radius-surface,
|
|
46
|
-
calc(var(--_corner-surface) * var(--ui-corner-tl, 1)) calc(var(--_corner-surface) * var(--ui-corner-tr, 1))
|
|
47
|
-
calc(var(--_corner-surface) * var(--ui-corner-br, 1)) calc(var(--_corner-surface) * var(--ui-corner-bl, 1))
|
|
48
|
-
);
|
|
49
|
-
/* The painted layer: a pattern, a texture, or a gradient an aesthetic lays
|
|
50
|
-
over the plate. Surfaces only, like the backdrop, so a control's label and
|
|
51
|
-
`.select`'s chevron never sit on one. The aesthetic that sets it owns the
|
|
52
|
-
contrast of the text over it, and a consumer's own `background-image` still
|
|
53
|
-
beats this declaration. */
|
|
54
|
-
background-image: var(--ui-surface-image, none);
|
|
55
|
-
/* Prefixed property first, deliberately: written second the minifier folds the
|
|
56
|
-
pair into the prefixed one alone, and the standard property never reaches
|
|
57
|
-
`dist/` -- which drops the blur in Firefox (the one engine with
|
|
58
|
-
`backdrop-filter` and not the `-webkit-` alias). Measured on the built CSS. */
|
|
59
|
-
-webkit-backdrop-filter: var(--ui-backdrop, none);
|
|
60
|
-
backdrop-filter: var(--ui-backdrop, none);
|
|
61
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
@import "../theme.css";
|
|
2
|
-
@import "../typography.css";
|
|
3
|
-
@import "./layout.css";
|
|
4
|
-
@import "./content.css";
|
|
5
|
-
|
|
6
|
-
@source inline("view vertical horizontal stack tight loose cluster between auto-grid section section-content narrow wide divider selection-contrast visually-hidden table-wrap data-table kbd quote quote-inline code pre");
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/* The gap is a private each layout declares from `--layout-gap`, and the
|
|
2
|
-
density modifiers write the private. A container's `--layout-gap` still
|
|
3
|
-
reaches every layout inside it, because each one reads the token afresh; a
|
|
4
|
-
`.tight` or `.loose` stays on its own element, the way `.p-xs` stays on a
|
|
5
|
-
card, because the layout inside declares its own private over the one it
|
|
6
|
-
would inherit. */
|
|
7
|
-
@utility view {
|
|
8
|
-
@apply flex gap-(--_gap);
|
|
9
|
-
|
|
10
|
-
--_gap: var(--layout-gap);
|
|
11
|
-
|
|
12
|
-
&.vertical {
|
|
13
|
-
@apply flex-col;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.horizontal {
|
|
17
|
-
@apply flex-row flex-wrap items-center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.tight {
|
|
21
|
-
--_gap: 0.5rem;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.loose {
|
|
25
|
-
--_gap: 1.5rem;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@utility stack {
|
|
30
|
-
@apply flex flex-col gap-(--_gap);
|
|
31
|
-
|
|
32
|
-
--_gap: var(--layout-gap);
|
|
33
|
-
|
|
34
|
-
&.tight {
|
|
35
|
-
--_gap: 0.5rem;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.loose {
|
|
39
|
-
--_gap: 1.5rem;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@utility cluster {
|
|
44
|
-
@apply flex flex-wrap items-center gap-(--_gap);
|
|
45
|
-
|
|
46
|
-
--_gap: var(--layout-gap);
|
|
47
|
-
|
|
48
|
-
&.between {
|
|
49
|
-
@apply justify-between;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.tight {
|
|
53
|
-
--_gap: 0.5rem;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.loose {
|
|
57
|
-
--_gap: 1.5rem;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@utility auto-grid {
|
|
62
|
-
@apply grid gap-(--_gap);
|
|
63
|
-
|
|
64
|
-
--_gap: var(--layout-gap);
|
|
65
|
-
|
|
66
|
-
grid-template-columns: repeat(auto-fit, minmax(min(var(--layout-grid-min), 100%), 1fr));
|
|
67
|
-
|
|
68
|
-
&.tight {
|
|
69
|
-
--_gap: 0.5rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.loose {
|
|
73
|
-
--_gap: 1.5rem;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@utility section {
|
|
78
|
-
@apply px-(--layout-gutter) py-(--layout-section-block);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@utility section-content {
|
|
82
|
-
@apply mx-auto w-full max-w-(--container-max);
|
|
83
|
-
|
|
84
|
-
&.narrow {
|
|
85
|
-
max-width: var(--container-narrow);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&.wide {
|
|
89
|
-
max-width: var(--container-wide);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* An indicator: intent only, and no presentation token at all. A rule is a
|
|
94
|
-
line, and neither a fill class nor an edge class has anything to say about
|
|
95
|
-
one -- a container's `.ghost.edgeless` must not make every `<hr>` inside it
|
|
96
|
-
invisible. The width is the aesthetic's line width, unscaled. */
|
|
97
|
-
@utility divider {
|
|
98
|
-
--divider-color: var(--intent-color);
|
|
99
|
-
--divider-width: var(--ui-border-width, var(--border-width));
|
|
100
|
-
|
|
101
|
-
@apply m-0 w-full border-0 border-t;
|
|
102
|
-
|
|
103
|
-
border-color: var(--divider-color);
|
|
104
|
-
border-top-width: var(--divider-width);
|
|
105
|
-
border-top-style: var(--ui-rule-style, var(--ui-line-style, solid));
|
|
106
|
-
|
|
107
|
-
&.vertical {
|
|
108
|
-
@apply h-auto w-0 self-stretch border-s border-t-0;
|
|
109
|
-
|
|
110
|
-
border-inline-start-width: var(--divider-width);
|
|
111
|
-
border-inline-start-style: var(--ui-rule-style, var(--ui-line-style, solid));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@utility selection-contrast {
|
|
116
|
-
&::selection,
|
|
117
|
-
& *::selection {
|
|
118
|
-
background: var(--color-primary-contrast);
|
|
119
|
-
color: var(--color-primary);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* `.visually-hidden`, the standard clip-based recipe. Tailwind's `sr-only` does
|
|
124
|
-
nothing on the vanilla entries (`.`, `/native`), which compile real CSS from
|
|
125
|
-
a scan of `src/` alone with no Tailwind utility layer to reach, so the
|
|
126
|
-
package publishes its own.
|
|
127
|
-
|
|
128
|
-
It is not named `.sr-only`: on a `/tw` entry the consumer's own Tailwind
|
|
129
|
-
build supplies that utility, and two same-named utilities in one cascade
|
|
130
|
-
collide silently -- the collision `registry.test.ts` polices (see
|
|
131
|
-
`data-table`'s `renamedFrom` in `registry.json`). `@source
|
|
132
|
-
inline("visually-hidden")` in `utilities/index.css` force-emits it on the
|
|
133
|
-
entries with no scannable markup of their own. */
|
|
134
|
-
@utility visually-hidden {
|
|
135
|
-
position: absolute;
|
|
136
|
-
width: 1px;
|
|
137
|
-
height: 1px;
|
|
138
|
-
padding: 0;
|
|
139
|
-
margin: -1px;
|
|
140
|
-
overflow: hidden;
|
|
141
|
-
clip: rect(0, 0, 0, 0);
|
|
142
|
-
white-space: nowrap;
|
|
143
|
-
border-width: 0;
|
|
144
|
-
}
|
|
File without changes
|