css-zero 3.0.1 → 4.0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +807 -0
- data/LICENSE.txt +21 -0
- data/app/assets/stylesheets/css-zero/animations.css +50 -50
- data/app/assets/stylesheets/css-zero/effects.css +14 -7
- data/app/assets/stylesheets/css-zero/filters.css +33 -41
- data/app/assets/stylesheets/css-zero/reset.css +19 -17
- data/app/assets/stylesheets/css-zero/transitions.css +12 -0
- data/app/assets/stylesheets/css-zero/typography.css +5 -2
- data/app/assets/stylesheets/css-zero/utilities.css +20 -23
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/USAGE +1 -1
- data/lib/generators/css_zero/add/resources.yml +17 -13
- data/lib/generators/css_zero/add/templates/app/assets/images/{menu.svg → panel-left.svg} +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/accordion.css +16 -6
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/alert.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/autoanimate.css +2 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/avatar.css +11 -11
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/badge.css +2 -3
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css +19 -9
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/carousel.css +2 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/combobox.css +21 -17
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/command.css +8 -15
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/datepicker.css +27 -19
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css +14 -9
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dropzone.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/flash.css +49 -30
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/group.css +4 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/icons.css +2 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/input_clearable.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/keyboard.css +21 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/layouts.css +7 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/lexxy.css +46 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/lightbox.css +2 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/list.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/menu.css +5 -3
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/pagination.css +17 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/popover.css +51 -5
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/progress.css +8 -8
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/separator.css +4 -4
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css +18 -12
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/sidebar_menu.css +3 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css +17 -7
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/tabs.css +24 -8
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js +22 -5
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js +4 -4
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js +5 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_controller.js +3 -5
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/dropzone_controller.js +2 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/flash_controller.js +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/form_controller.js +4 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/interest_controller.js +27 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js +2 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/sound_controller.js +70 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/toggle_class_controller.js +17 -0
- data/lib/generators/css_zero/authentication/templates/app/views/passwords/edit.html.erb.tt +1 -1
- data/lib/generators/css_zero/authentication/templates/app/views/passwords/new.html.erb.tt +1 -1
- data/lib/generators/css_zero/authentication/templates/app/views/sessions/new.html.erb.tt +2 -2
- data/lib/generators/css_zero/install/templates/app/assets/stylesheets/base.css +2 -3
- data/lib/generators/css_zero/install/templates/app/views/layouts/application.html.erb +2 -2
- data/lib/generators/css_zero/scaffold/templates/index.html.erb.tt +1 -1
- data/lib/generators/css_zero/scaffold/templates/partial.html.erb.tt +2 -2
- metadata +26 -7
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/prose.css +0 -140
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/trix.css +0 -210
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js +0 -55
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
@import url("https://esm.sh/trix@2.1.15/dist/trix.css");
|
|
2
|
-
|
|
3
|
-
/* Action Text */
|
|
4
|
-
|
|
5
|
-
.trix-content .attachment-gallery > action-text-attachment,
|
|
6
|
-
.trix-content .attachment-gallery > .attachment {
|
|
7
|
-
flex: 1 0 33%;
|
|
8
|
-
padding: 0 0.5em;
|
|
9
|
-
max-width: 33%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
|
|
13
|
-
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
|
|
14
|
-
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
|
|
15
|
-
flex-basis: 50%;
|
|
16
|
-
max-width: 50%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.trix-content action-text-attachment .attachment {
|
|
20
|
-
padding: 0 !important;
|
|
21
|
-
max-width: 100% !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* CSS Zero */
|
|
25
|
-
|
|
26
|
-
trix-toolbar {
|
|
27
|
-
inline-size: 100%;
|
|
28
|
-
inset-block-start: 0;
|
|
29
|
-
position: sticky;
|
|
30
|
-
|
|
31
|
-
.trix-button-row {
|
|
32
|
-
background-color: white;
|
|
33
|
-
border-block-width: 1px;
|
|
34
|
-
column-gap: 1px;
|
|
35
|
-
padding: var(--size-1_5) var(--size-1);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.trix-button-group {
|
|
39
|
-
border: 0 !important;
|
|
40
|
-
column-gap: 1px;
|
|
41
|
-
margin: 0 !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.trix-button {
|
|
45
|
-
background-color: transparent;
|
|
46
|
-
border: 0 !important;
|
|
47
|
-
border-radius: var(--rounded-md);
|
|
48
|
-
color: var(--color-text-reversed);
|
|
49
|
-
|
|
50
|
-
&.trix-active {
|
|
51
|
-
background-color: gainsboro;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&.trix-button--icon::before {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&.trix-button--icon:disabled::before {
|
|
59
|
-
opacity: 0.125;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.trix-dialog {
|
|
64
|
-
background-color: var(--color-bg);
|
|
65
|
-
border: 1px solid var(--color-border);
|
|
66
|
-
border-radius: var(--rounded-md);
|
|
67
|
-
box-shadow: var(--shadow-md);
|
|
68
|
-
margin: var(--size-1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.trix-input--dialog {
|
|
72
|
-
background-color: var(--color-surface);
|
|
73
|
-
border-color: var(--color-border);
|
|
74
|
-
margin: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.trix-button--dialog {
|
|
78
|
-
background-color: var(--color-primary);
|
|
79
|
-
color: var(--color-text-reversed);
|
|
80
|
-
margin-inline-start: var(--size-1_5);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
[data-trix-dialog] [data-trix-validate]:invalid {
|
|
84
|
-
background-color: rgb(from var(--color-negative) r g b / .2);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@media (max-width: 48rem) {
|
|
88
|
-
.trix-button-group--history-tools { display: none; }
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
trix-editor {
|
|
93
|
-
border: 0;
|
|
94
|
-
inline-size: 100%;
|
|
95
|
-
min-block-size: var(--size-72);
|
|
96
|
-
padding-block: var(--size-6) var(--size-2);
|
|
97
|
-
|
|
98
|
-
&:empty:not(:focus)::before {
|
|
99
|
-
color: color-mix(in oklab, currentColor 50%, transparent);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
[data-trix-mutable].attachment img,
|
|
103
|
-
[data-trix-mutable].attachment--content,
|
|
104
|
-
[data-trix-mutable].attachment--file {
|
|
105
|
-
box-shadow: 0 0 0 2px var(--color-selected-dark);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.attachment__metadata {
|
|
109
|
-
background-color: var(--color-border-light);
|
|
110
|
-
color: var(--color-text);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&:focus-visible {
|
|
114
|
-
outline: 0;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.trix-content {
|
|
119
|
-
& {
|
|
120
|
-
line-height: var(--leading-7);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
a {
|
|
124
|
-
color: var(--color-link);
|
|
125
|
-
text-decoration: underline;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
h1 {
|
|
129
|
-
font-size: var(--text-2xl);
|
|
130
|
-
font-weight: var(--font-semibold);
|
|
131
|
-
line-height: var(--leading-8);
|
|
132
|
-
margin-block-end: var(--size-6);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
blockquote {
|
|
136
|
-
border-inline-start: 2px solid var(--color-border);
|
|
137
|
-
font-style: italic;
|
|
138
|
-
margin: 0;
|
|
139
|
-
padding-inline-end: 0;
|
|
140
|
-
padding-inline-start: var(--size-6);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
pre {
|
|
144
|
-
background-color: var(--color-border-light);
|
|
145
|
-
border-radius: var(--rounded-lg);
|
|
146
|
-
font-family: var(--font-monospace-code);
|
|
147
|
-
font-size: var(--text-sm);
|
|
148
|
-
line-height: var(--leading-5);
|
|
149
|
-
padding: var(--size-4);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
ul {
|
|
153
|
-
list-style-type: disc;
|
|
154
|
-
margin-inline-start: var(--size-6);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
ol {
|
|
158
|
-
list-style-type: decimal;
|
|
159
|
-
margin-inline-start: var(--size-6);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
li {
|
|
163
|
-
margin: 0;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
img {
|
|
167
|
-
display: inline;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
action-text-attachment {
|
|
171
|
-
display: contents;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.attachment:not(.attachment--file) {
|
|
175
|
-
.attachment__caption { display: none; }
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.attachment--file {
|
|
179
|
-
border: 1px solid var(--color-border);
|
|
180
|
-
color: var(--color--text);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.attachment__progress {
|
|
184
|
-
background-color: var(--color-border-light);
|
|
185
|
-
border-radius: var(--rounded-full);
|
|
186
|
-
overflow: hidden;
|
|
187
|
-
|
|
188
|
-
&::-webkit-progress-bar {
|
|
189
|
-
background-color: var(--color-border-light);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&::-webkit-progress-value {
|
|
193
|
-
background-color: var(--color-primary);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&::-moz-progress-bar {
|
|
197
|
-
background-color: var(--color-primary);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.trix--minimal {
|
|
203
|
-
.trix-button-group--file-tools {
|
|
204
|
-
display: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.trix-button-group--history-tools {
|
|
208
|
-
display: none;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Controller } from "@hotwired/stimulus"
|
|
2
|
-
import { computePosition, flip, shift, offset, autoUpdate } from "https://esm.sh/@floating-ui/dom@1.7.4?standalone"
|
|
3
|
-
|
|
4
|
-
export default class extends Controller {
|
|
5
|
-
static targets = [ "trigger", "content" ]
|
|
6
|
-
static values = { placement: { type: String, default: "bottom" } }
|
|
7
|
-
|
|
8
|
-
#showTimer
|
|
9
|
-
#hideTimer
|
|
10
|
-
|
|
11
|
-
initialize() {
|
|
12
|
-
this.orient = this.orient.bind(this)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
connect() {
|
|
16
|
-
this.cleanup = autoUpdate(this.triggerTarget, this.contentTarget, this.orient)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
disconnect() {
|
|
20
|
-
this.cleanup()
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
show() {
|
|
24
|
-
this.contentTarget.showPopover({ source: this.triggerTarget })
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
hide() {
|
|
28
|
-
this.contentTarget.hidePopover()
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
toggle() {
|
|
32
|
-
this.contentTarget.togglePopover({ source: this.triggerTarget })
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
debouncedShow() {
|
|
36
|
-
clearTimeout(this.#hideTimer)
|
|
37
|
-
this.#showTimer = setTimeout(() => this.show(), 150)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
debouncedHide() {
|
|
41
|
-
clearTimeout(this.#showTimer)
|
|
42
|
-
this.#hideTimer = setTimeout(() => this.hide(), 150)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
orient() {
|
|
46
|
-
computePosition(this.triggerTarget, this.contentTarget, this.#options).then(({x, y}) => {
|
|
47
|
-
this.contentTarget.style.insetInlineStart = `${x}px`
|
|
48
|
-
this.contentTarget.style.insetBlockStart = `${y}px`
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
get #options() {
|
|
53
|
-
return { placement: this.placementValue, middleware: [offset(4), flip(), shift({padding: 4})] }
|
|
54
|
-
}
|
|
55
|
-
}
|