@carissa-io/theme-default 0.0.0-stage → 0.1.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/DESIGN.md +174 -0
- package/README.md +45 -2
- package/dist/index.css +1148 -0
- package/package.json +131 -4
- package/scss/index.scss +511 -0
package/package.json
CHANGED
|
@@ -1,6 +1,133 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carissa-io/theme-default",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Carissa UI: the default theme (Swiss minimalism) as SCSS variable overrides of the Carissa components, with a compiled CSS build",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"style": "dist/index.css",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"scss",
|
|
10
|
+
"DESIGN.md"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/index.css",
|
|
14
|
+
"./css": "./dist/index.css",
|
|
15
|
+
"./scss": "./scss/index.scss"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": [
|
|
18
|
+
"*.css"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "sass --load-path=node_modules --no-source-map scss/index.scss dist/index.css",
|
|
22
|
+
"lint": "node scripts/lint.mjs",
|
|
23
|
+
"pretest": "npm run build",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"prepublishOnly": "node -e \"if (!process.env.GITHUB_ACTIONS) { console.error('Refusing to publish outside GitHub Actions CI: commit and push to main instead.'); process.exit(1); }\" && npm run build"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/carissa-io/theme-default.git"
|
|
30
|
+
},
|
|
31
|
+
"license": "UNLICENSED",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=24"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@carissa-io/components-input": "^0.2.1",
|
|
37
|
+
"@carissa-io/components-email": "^0.1.6",
|
|
38
|
+
"@carissa-io/components-password": "^0.1.7",
|
|
39
|
+
"@carissa-io/components-url": "^0.1.7",
|
|
40
|
+
"@carissa-io/components-button": "^0.1.1",
|
|
41
|
+
"@carissa-io/components-checkbox": "^0.1.1",
|
|
42
|
+
"@carissa-io/components-switch": "^0.1.1",
|
|
43
|
+
"@carissa-io/components-radio-group": "^0.1.1",
|
|
44
|
+
"@carissa-io/components-textarea": "^0.1.1",
|
|
45
|
+
"@carissa-io/components-slider": "^0.1.1",
|
|
46
|
+
"@carissa-io/components-popover": "^0.1.1",
|
|
47
|
+
"@carissa-io/components-listbox": "^0.1.1",
|
|
48
|
+
"@carissa-io/components-select": "^0.1.1",
|
|
49
|
+
"@carissa-io/components-combobox": "^0.1.1",
|
|
50
|
+
"@carissa-io/components-upload": "^0.1.1",
|
|
51
|
+
"@carissa-io/components-calendar": "^0.1.1",
|
|
52
|
+
"@carissa-io/components-date-picker": "^0.1.1",
|
|
53
|
+
"@carissa-io/components-search": "^0.1.1"
|
|
54
|
+
},
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"@carissa-io/components-input": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"@carissa-io/components-email": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"@carissa-io/components-password": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"@carissa-io/components-url": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"@carissa-io/components-button": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@carissa-io/components-checkbox": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"@carissa-io/components-switch": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"@carissa-io/components-radio-group": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"@carissa-io/components-textarea": {
|
|
81
|
+
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"@carissa-io/components-slider": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"@carissa-io/components-popover": {
|
|
87
|
+
"optional": true
|
|
88
|
+
},
|
|
89
|
+
"@carissa-io/components-listbox": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@carissa-io/components-select": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@carissa-io/components-combobox": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"@carissa-io/components-upload": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"@carissa-io/components-calendar": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"@carissa-io/components-date-picker": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"@carissa-io/components-search": {
|
|
108
|
+
"optional": true
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"devDependencies": {
|
|
112
|
+
"@carissa-io/components-button": "^0.1.1",
|
|
113
|
+
"@carissa-io/components-calendar": "^0.1.1",
|
|
114
|
+
"@carissa-io/components-checkbox": "^0.1.1",
|
|
115
|
+
"@carissa-io/components-combobox": "^0.1.1",
|
|
116
|
+
"@carissa-io/components-date-picker": "^0.1.1",
|
|
117
|
+
"@carissa-io/components-input": "^0.2.1",
|
|
118
|
+
"@carissa-io/components-listbox": "^0.1.1",
|
|
119
|
+
"@carissa-io/components-popover": "^0.1.1",
|
|
120
|
+
"@carissa-io/components-radio-group": "^0.1.1",
|
|
121
|
+
"@carissa-io/components-search": "^0.1.1",
|
|
122
|
+
"@carissa-io/components-select": "^0.1.1",
|
|
123
|
+
"@carissa-io/components-slider": "^0.1.1",
|
|
124
|
+
"@carissa-io/components-switch": "^0.1.1",
|
|
125
|
+
"@carissa-io/components-upload": "^0.1.1",
|
|
126
|
+
"sass-embedded": "^1.105.1",
|
|
127
|
+
"vitest": "^4.1.11"
|
|
128
|
+
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"registry": "https://registry.npmjs.org",
|
|
131
|
+
"access": "public"
|
|
132
|
+
}
|
|
133
|
+
}
|
package/scss/index.scss
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
// Carissa Default theme: Swiss minimalism (see DESIGN.md). Only variable overrides, no component code.
|
|
2
|
+
// Neutral scale = Tailwind's neutral palette values, written out as plain colors.
|
|
3
|
+
|
|
4
|
+
// Palette (Tailwind's neutral scale as plain colors), named by role so a theme is changed in one place.
|
|
5
|
+
$black: #000; // primary, hover and focus
|
|
6
|
+
$white: #fff;
|
|
7
|
+
$text: #171717;
|
|
8
|
+
$muted: #737373; // labels, field borders, placeholders (4.7:1 on white)
|
|
9
|
+
$surface: #f5f5f5; // hover surface, disabled background
|
|
10
|
+
$surface-active: #e5e5e5;
|
|
11
|
+
$primary-hover: #262626;
|
|
12
|
+
$primary-active: #404040;
|
|
13
|
+
$disabled-text: #a3a3a3;
|
|
14
|
+
$disabled-border: #d4d4d4;
|
|
15
|
+
$error: #dc3545;
|
|
16
|
+
|
|
17
|
+
// Values shared by every component, so the whole theme moves together.
|
|
18
|
+
$font-family: ('Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif);
|
|
19
|
+
$radius: 0;
|
|
20
|
+
$min-height: 2.75rem; // 44px touch target
|
|
21
|
+
$focus-color: $black;
|
|
22
|
+
$focus-width: 1px;
|
|
23
|
+
$transition-duration: 0.2s;
|
|
24
|
+
$label-font-size: 0.6875rem;
|
|
25
|
+
$label-font-weight: 700;
|
|
26
|
+
$label-letter-spacing: 0.1em;
|
|
27
|
+
|
|
28
|
+
// The dropdown arrow of Select and Combobox: 16px, muted, black on hover and when open, turns over with the list.
|
|
29
|
+
$arrow-size: 1rem;
|
|
30
|
+
$arrow-offset: 0.75rem;
|
|
31
|
+
$arrow-color: $muted;
|
|
32
|
+
$arrow-color-active: $black;
|
|
33
|
+
$arrow-color-disabled: $disabled-text;
|
|
34
|
+
$arrow-transition: (rotate $transition-duration ease, color $transition-duration ease);
|
|
35
|
+
$arrow-rotate-open: 180deg;
|
|
36
|
+
|
|
37
|
+
@use '@carissa-io/components-input/scss' as input with (
|
|
38
|
+
// Typography: neutral grotesque stack (no webfont to load), label = bold, uppercase, tracking-widest
|
|
39
|
+
$c-input-font-family: $font-family,
|
|
40
|
+
$c-input-font-size: 1rem,
|
|
41
|
+
$c-input-label-layout: notched,
|
|
42
|
+
$c-input-label-font-size: $label-font-size,
|
|
43
|
+
$c-input-label-font-weight: $label-font-weight,
|
|
44
|
+
$c-input-label-text-transform: uppercase,
|
|
45
|
+
$c-input-label-letter-spacing: $label-letter-spacing,
|
|
46
|
+
$c-input-label-color: $muted,
|
|
47
|
+
$c-input-color: $text,
|
|
48
|
+
|
|
49
|
+
// Surface and borders: high contrast, absolute black as the primary color
|
|
50
|
+
$c-input-background: $white,
|
|
51
|
+
$c-input-placeholder-color: $muted,
|
|
52
|
+
$c-input-border-color: $muted,
|
|
53
|
+
$c-input-border-color-hover: $black,
|
|
54
|
+
$c-input-focus-color: $focus-color,
|
|
55
|
+
$c-input-focus-ring: $focus-color,
|
|
56
|
+
$c-input-focus-ring-width: $focus-width,
|
|
57
|
+
$c-input-error-ring: $error,
|
|
58
|
+
$c-input-disabled-background: $surface,
|
|
59
|
+
$c-input-disabled-color: $disabled-text,
|
|
60
|
+
|
|
61
|
+
// Box: square corners, 44px minimum touch target
|
|
62
|
+
$c-input-radius: $radius,
|
|
63
|
+
$c-input-min-height: $min-height,
|
|
64
|
+
$c-input-padding-y: 0.375rem,
|
|
65
|
+
$c-input-padding-x: 0.75rem,
|
|
66
|
+
|
|
67
|
+
// Multiline (textarea): vertical resize only, a roomy minimum
|
|
68
|
+
$c-input-resize: vertical,
|
|
69
|
+
$c-input-textarea-min-height: 6rem,
|
|
70
|
+
$c-input-textarea-padding-y: 0.875rem, // room under the notched label
|
|
71
|
+
|
|
72
|
+
// Motion: subtle, 200ms
|
|
73
|
+
$c-input-transition: border-color $transition-duration ease,
|
|
74
|
+
|
|
75
|
+
// Side button
|
|
76
|
+
$c-input-button-color: $muted,
|
|
77
|
+
$c-input-button-color-hover: $black
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
@use '@carissa-io/components-button/scss' as button with (
|
|
81
|
+
// Typography: same stack and label style as the input labels
|
|
82
|
+
$c-button-font-family: $font-family,
|
|
83
|
+
$c-button-font-size: $label-font-size,
|
|
84
|
+
$c-button-font-weight: $label-font-weight,
|
|
85
|
+
$c-button-text-transform: uppercase,
|
|
86
|
+
$c-button-letter-spacing: $label-letter-spacing,
|
|
87
|
+
|
|
88
|
+
// Box: square corners, 44px minimum touch target
|
|
89
|
+
$c-button-radius: $radius,
|
|
90
|
+
$c-button-min-height: $min-height,
|
|
91
|
+
$c-button-padding-y: 0.375rem,
|
|
92
|
+
$c-button-padding-x: 1.25rem,
|
|
93
|
+
$c-button-transition: (color $transition-duration ease, background-color $transition-duration ease, border-color $transition-duration ease),
|
|
94
|
+
|
|
95
|
+
// Primary: absolute black, white text
|
|
96
|
+
$c-button-primary-color: $white,
|
|
97
|
+
$c-button-primary-background: $black,
|
|
98
|
+
$c-button-primary-border-color: $black,
|
|
99
|
+
$c-button-primary-color-hover: $white,
|
|
100
|
+
$c-button-primary-background-hover: $primary-hover,
|
|
101
|
+
$c-button-primary-border-color-hover: $primary-hover,
|
|
102
|
+
$c-button-primary-color-active: $white,
|
|
103
|
+
$c-button-primary-background-active: $primary-active,
|
|
104
|
+
$c-button-primary-border-color-active: $primary-active,
|
|
105
|
+
$c-button-primary-color-disabled: $disabled-text,
|
|
106
|
+
$c-button-primary-background-disabled: $surface,
|
|
107
|
+
$c-button-primary-border-color-disabled: $surface,
|
|
108
|
+
|
|
109
|
+
// Secondary: 1px #737373 border, black on hover
|
|
110
|
+
$c-button-secondary-color: $text,
|
|
111
|
+
$c-button-secondary-background: $white,
|
|
112
|
+
$c-button-secondary-border-color: $muted,
|
|
113
|
+
$c-button-secondary-color-hover: $black,
|
|
114
|
+
$c-button-secondary-background-hover: $white,
|
|
115
|
+
$c-button-secondary-border-color-hover: $black,
|
|
116
|
+
$c-button-secondary-color-active: $black,
|
|
117
|
+
$c-button-secondary-background-active: $surface,
|
|
118
|
+
$c-button-secondary-border-color-active: $black,
|
|
119
|
+
$c-button-secondary-color-disabled: $disabled-text,
|
|
120
|
+
$c-button-secondary-background-disabled: $white,
|
|
121
|
+
$c-button-secondary-border-color-disabled: $disabled-border,
|
|
122
|
+
|
|
123
|
+
// Ghost: transparent, a light surface on hover
|
|
124
|
+
$c-button-ghost-color: $text,
|
|
125
|
+
$c-button-ghost-background: transparent,
|
|
126
|
+
$c-button-ghost-border-color: transparent,
|
|
127
|
+
$c-button-ghost-color-hover: $black,
|
|
128
|
+
$c-button-ghost-background-hover: $surface,
|
|
129
|
+
$c-button-ghost-border-color-hover: transparent,
|
|
130
|
+
$c-button-ghost-color-active: $black,
|
|
131
|
+
$c-button-ghost-background-active: $surface-active,
|
|
132
|
+
$c-button-ghost-border-color-active: transparent,
|
|
133
|
+
$c-button-ghost-color-disabled: $disabled-text,
|
|
134
|
+
$c-button-ghost-background-disabled: transparent,
|
|
135
|
+
$c-button-ghost-border-color-disabled: transparent,
|
|
136
|
+
|
|
137
|
+
// Focus: 1px black ring, offset from the button
|
|
138
|
+
$c-button-focus-color: $focus-color,
|
|
139
|
+
$c-button-focus-width: $focus-width,
|
|
140
|
+
$c-button-focus-offset: 2px
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// Checkbox is configured before Switch: Switch's index forwards (and so loads) Checkbox, and Sass only accepts a
|
|
144
|
+
// module's configuration before the module is first loaded.
|
|
145
|
+
@use '@carissa-io/components-checkbox/scss' as checkbox with (
|
|
146
|
+
// Typography: body text (not the uppercase field-label style), same stack
|
|
147
|
+
$c-checkbox-font-family: $font-family,
|
|
148
|
+
$c-checkbox-font-size: 1rem,
|
|
149
|
+
$c-checkbox-label-color: $text,
|
|
150
|
+
|
|
151
|
+
// Row: 44px minimum touch target
|
|
152
|
+
$c-checkbox-min-height: $min-height,
|
|
153
|
+
$c-checkbox-gap: 0.75rem,
|
|
154
|
+
$c-checkbox-transition: (color $transition-duration ease, background-color $transition-duration ease, border-color $transition-duration ease, opacity $transition-duration ease),
|
|
155
|
+
|
|
156
|
+
// Box: 20px square, 1px #737373 border, black on hover
|
|
157
|
+
$c-checkbox-box-size: 1.25rem,
|
|
158
|
+
$c-checkbox-border-color: $muted,
|
|
159
|
+
$c-checkbox-border-color-hover: $black,
|
|
160
|
+
$c-checkbox-background: $white,
|
|
161
|
+
$c-checkbox-radius: $radius,
|
|
162
|
+
|
|
163
|
+
// Checked: black box, white mark
|
|
164
|
+
$c-checkbox-checked-background: $black,
|
|
165
|
+
$c-checkbox-checked-border-color: $black,
|
|
166
|
+
$c-checkbox-mark-color: $white,
|
|
167
|
+
$c-checkbox-mark-size: 1rem,
|
|
168
|
+
|
|
169
|
+
// Disabled: #a3a3a3 on #f5f5f5
|
|
170
|
+
$c-checkbox-disabled-color: $disabled-text,
|
|
171
|
+
$c-checkbox-disabled-background: $surface,
|
|
172
|
+
$c-checkbox-disabled-border-color: $disabled-border,
|
|
173
|
+
$c-checkbox-disabled-mark-color: $disabled-text,
|
|
174
|
+
|
|
175
|
+
// Focus: 1px black ring, offset from the box
|
|
176
|
+
$c-checkbox-focus-color: $focus-color,
|
|
177
|
+
$c-checkbox-focus-width: $focus-width,
|
|
178
|
+
$c-checkbox-focus-offset: 2px,
|
|
179
|
+
|
|
180
|
+
// Error: same red as the input error ring
|
|
181
|
+
$c-checkbox-error-color: $error,
|
|
182
|
+
$c-checkbox-error-font-size: 0.8125rem
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
@use '@carissa-io/components-switch/scss' as switch with (
|
|
186
|
+
// Track: square, 40 x 20px, white with a 1px #737373 border; black when on
|
|
187
|
+
$c-switch-track-width: 2.5rem,
|
|
188
|
+
$c-switch-track-height: 1.25rem,
|
|
189
|
+
$c-switch-track-radius: $radius,
|
|
190
|
+
$c-switch-track-background: $white,
|
|
191
|
+
$c-switch-track-border-color: $muted,
|
|
192
|
+
$c-switch-track-border-color-hover: $black,
|
|
193
|
+
$c-switch-track-background-checked: $black,
|
|
194
|
+
$c-switch-track-border-color-checked: $black,
|
|
195
|
+
$c-switch-track-border-color-invalid: $error,
|
|
196
|
+
$c-switch-track-background-disabled: $surface,
|
|
197
|
+
$c-switch-track-border-color-disabled: $disabled-border,
|
|
198
|
+
|
|
199
|
+
// Thumb: square, #737373 when off, white when on
|
|
200
|
+
$c-switch-thumb-size: 0.875rem,
|
|
201
|
+
$c-switch-thumb-offset: 0.125rem,
|
|
202
|
+
$c-switch-thumb-radius: $radius,
|
|
203
|
+
$c-switch-thumb-color: $muted,
|
|
204
|
+
$c-switch-thumb-color-checked: $white,
|
|
205
|
+
$c-switch-thumb-color-disabled: $disabled-text,
|
|
206
|
+
|
|
207
|
+
// Motion: subtle, 200ms
|
|
208
|
+
$c-switch-transition: (background-color $transition-duration ease, border-color $transition-duration ease, transform $transition-duration ease),
|
|
209
|
+
|
|
210
|
+
// Focus: 1px black ring, offset from the track
|
|
211
|
+
$c-switch-focus-color: $focus-color,
|
|
212
|
+
$c-switch-focus-width: $focus-width,
|
|
213
|
+
$c-switch-focus-offset: 2px
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
@use '@carissa-io/components-radio-group/scss' as radio-group with (
|
|
217
|
+
// Typography: legend = the field-label style, options = body text
|
|
218
|
+
$c-radio-group-font-family: $font-family,
|
|
219
|
+
$c-radio-group-legend-font-size: $label-font-size,
|
|
220
|
+
$c-radio-group-legend-font-weight: $label-font-weight,
|
|
221
|
+
$c-radio-group-legend-text-transform: uppercase,
|
|
222
|
+
$c-radio-group-legend-letter-spacing: $label-letter-spacing,
|
|
223
|
+
$c-radio-group-legend-color: $muted,
|
|
224
|
+
$c-radio-group-legend-line-height: 1rem,
|
|
225
|
+
$c-radio-group-label-font-size: 1rem,
|
|
226
|
+
$c-radio-group-label-color: $text,
|
|
227
|
+
|
|
228
|
+
// Rows: 44px minimum touch target
|
|
229
|
+
$c-radio-group-min-height: $min-height,
|
|
230
|
+
$c-radio-group-gap: 0,
|
|
231
|
+
$c-radio-group-dot-gap: 0.75rem,
|
|
232
|
+
$c-radio-group-transition: (color $transition-duration ease, background-color $transition-duration ease, border-color $transition-duration ease, background-size $transition-duration ease),
|
|
233
|
+
|
|
234
|
+
// Dot: 20px circle (a radio is round, so the radius stays 50%), 1px #737373 border, black on hover
|
|
235
|
+
$c-radio-group-dot-size: 1.25rem,
|
|
236
|
+
$c-radio-group-border-color: $muted,
|
|
237
|
+
$c-radio-group-border-color-hover: $black,
|
|
238
|
+
$c-radio-group-background: $white,
|
|
239
|
+
|
|
240
|
+
// Checked: black border and a 10px black inner dot
|
|
241
|
+
$c-radio-group-checked-color: $black,
|
|
242
|
+
$c-radio-group-inner-size: 0.625rem,
|
|
243
|
+
$c-radio-group-inner-color: $black,
|
|
244
|
+
|
|
245
|
+
// Disabled: #a3a3a3 on #f5f5f5
|
|
246
|
+
$c-radio-group-disabled-color: $disabled-text,
|
|
247
|
+
$c-radio-group-disabled-background: $surface,
|
|
248
|
+
$c-radio-group-disabled-border-color: $disabled-border,
|
|
249
|
+
$c-radio-group-disabled-inner-color: $disabled-text,
|
|
250
|
+
|
|
251
|
+
// Focus: the dot's border grows from 1px to 2px, black
|
|
252
|
+
$c-radio-group-focus-color: $focus-color,
|
|
253
|
+
$c-radio-group-focus-width: $focus-width,
|
|
254
|
+
|
|
255
|
+
// Error: same red as the input error ring
|
|
256
|
+
$c-radio-group-error-color: $error,
|
|
257
|
+
$c-radio-group-error-font-size: 0.8125rem
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
@use '@carissa-io/components-slider/scss' as slider with (
|
|
261
|
+
// Typography: label = the field-label style, live value = body text
|
|
262
|
+
$c-slider-font-family: $font-family,
|
|
263
|
+
$c-slider-font-size: 1rem,
|
|
264
|
+
$c-slider-color: $text,
|
|
265
|
+
$c-slider-label-font-size: $label-font-size,
|
|
266
|
+
$c-slider-label-font-weight: $label-font-weight,
|
|
267
|
+
$c-slider-label-text-transform: uppercase,
|
|
268
|
+
$c-slider-label-letter-spacing: $label-letter-spacing,
|
|
269
|
+
$c-slider-label-color: $muted,
|
|
270
|
+
$c-slider-value-font-size: 1rem,
|
|
271
|
+
$c-slider-value-color: $text,
|
|
272
|
+
|
|
273
|
+
// Control: 44px minimum touch target, subtle 200ms motion
|
|
274
|
+
$c-slider-min-height: $min-height,
|
|
275
|
+
$c-slider-transition: (background-color $transition-duration ease, border-color $transition-duration ease),
|
|
276
|
+
|
|
277
|
+
// Track: 2px #737373 line with a black fill
|
|
278
|
+
$c-slider-track-height: 2px,
|
|
279
|
+
$c-slider-track-color: $muted,
|
|
280
|
+
$c-slider-track-fill-color: $black,
|
|
281
|
+
$c-slider-track-radius: $radius,
|
|
282
|
+
|
|
283
|
+
// Thumb: 20px black square with a 1px white border; slightly lighter on hover and active
|
|
284
|
+
$c-slider-thumb-size: 1.25rem,
|
|
285
|
+
$c-slider-thumb-color: $black,
|
|
286
|
+
$c-slider-thumb-color-hover: $primary-hover,
|
|
287
|
+
$c-slider-thumb-color-active: $primary-active,
|
|
288
|
+
$c-slider-thumb-border-width: 1px,
|
|
289
|
+
$c-slider-thumb-border-color: $white,
|
|
290
|
+
$c-slider-thumb-radius: $radius,
|
|
291
|
+
|
|
292
|
+
// Disabled: #a3a3a3 on a #d4d4d4 track
|
|
293
|
+
$c-slider-disabled-color: $disabled-text,
|
|
294
|
+
$c-slider-disabled-track-color: $disabled-border,
|
|
295
|
+
$c-slider-disabled-fill-color: $disabled-text,
|
|
296
|
+
$c-slider-disabled-thumb-color: $disabled-text,
|
|
297
|
+
|
|
298
|
+
// Focus: 1px black ring, offset from the thumb
|
|
299
|
+
$c-slider-focus-color: $focus-color,
|
|
300
|
+
$c-slider-focus-width: $focus-width,
|
|
301
|
+
$c-slider-focus-offset: 2px
|
|
302
|
+
);
|
|
303
|
+
|
|
304
|
+
@use '@carissa-io/components-popover/scss' as popover with (
|
|
305
|
+
// Panel: white, 1px #737373 border, square, flat (no shadow), 4px below the anchor
|
|
306
|
+
$c-popover-background: $white,
|
|
307
|
+
$c-popover-color: $text,
|
|
308
|
+
$c-popover-border-width: 1px,
|
|
309
|
+
$c-popover-border-color: $muted,
|
|
310
|
+
$c-popover-radius: $radius,
|
|
311
|
+
$c-popover-shadow: none,
|
|
312
|
+
$c-popover-offset: 0.5rem, // clears the half of a notched label that overhangs the field
|
|
313
|
+
$c-popover-fade-duration: $transition-duration
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
@use '@carissa-io/components-listbox/scss' as listbox with (
|
|
317
|
+
// Options: body text, 44px minimum touch target
|
|
318
|
+
$c-listbox-font-family: $font-family,
|
|
319
|
+
$c-listbox-font-size: 1rem,
|
|
320
|
+
$c-listbox-max-height: 15rem,
|
|
321
|
+
$c-listbox-option-color: $text,
|
|
322
|
+
$c-listbox-option-min-height: $min-height,
|
|
323
|
+
$c-listbox-option-padding-y: 0,
|
|
324
|
+
$c-listbox-option-padding-x: 0.75rem,
|
|
325
|
+
$c-listbox-option-transition: (background-color $transition-duration ease, color $transition-duration ease),
|
|
326
|
+
|
|
327
|
+
// Active: the hover surface
|
|
328
|
+
$c-listbox-option-active-color: $text,
|
|
329
|
+
$c-listbox-option-active-background: $surface,
|
|
330
|
+
|
|
331
|
+
// Selected: bold with a 2px black bar on the inline-start side
|
|
332
|
+
$c-listbox-option-selected-color: $text,
|
|
333
|
+
$c-listbox-option-selected-font-weight: 700,
|
|
334
|
+
$c-listbox-option-selected-marker-width: 2px,
|
|
335
|
+
$c-listbox-option-selected-marker-color: $black,
|
|
336
|
+
|
|
337
|
+
// Disabled and empty
|
|
338
|
+
$c-listbox-option-disabled-color: $disabled-text,
|
|
339
|
+
$c-listbox-empty-color: $muted,
|
|
340
|
+
$c-listbox-empty-padding: 0.75rem
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
// Select reuses the input look (configured above); it only adds the trigger and the arrow. Its index forwards the
|
|
344
|
+
// input, popover and listbox styles, which are already loaded and configured by the blocks above: keep this block after them.
|
|
345
|
+
@use '@carissa-io/components-select/scss' as select with (
|
|
346
|
+
// Trigger: body text, placeholder in the same muted tone as the input placeholder
|
|
347
|
+
$c-select-trigger-color: $text,
|
|
348
|
+
$c-select-placeholder-color: $muted,
|
|
349
|
+
$c-select-trigger-min-height: 1.5em,
|
|
350
|
+
|
|
351
|
+
// Arrow: shared with the Combobox
|
|
352
|
+
$c-select-arrow-size: $arrow-size,
|
|
353
|
+
$c-select-arrow-offset: $arrow-offset,
|
|
354
|
+
$c-select-arrow-color: $arrow-color,
|
|
355
|
+
$c-select-arrow-color-hover: $arrow-color-active,
|
|
356
|
+
$c-select-arrow-color-open: $arrow-color-active,
|
|
357
|
+
$c-select-arrow-color-disabled: $arrow-color-disabled,
|
|
358
|
+
$c-select-arrow-transition: $arrow-transition,
|
|
359
|
+
$c-select-arrow-rotate-open: $arrow-rotate-open,
|
|
360
|
+
|
|
361
|
+
// Open: the focused border
|
|
362
|
+
$c-select-open-border-color: $focus-color
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
// Combobox: the same field as Select with a text input in place of the button, and the same arrow. Its index forwards
|
|
366
|
+
// the same input, popover and listbox styles, already loaded by the blocks above, so it must come after them (and
|
|
367
|
+
// after Select, which forwards them too).
|
|
368
|
+
@use '@carissa-io/components-combobox/scss' as combobox with (
|
|
369
|
+
// Text: body text; the placeholder stays the input's muted one
|
|
370
|
+
$c-combobox-color: $text,
|
|
371
|
+
$c-combobox-min-height: 1.5em,
|
|
372
|
+
|
|
373
|
+
// Arrow: shared with the Select
|
|
374
|
+
$c-combobox-arrow-size: $arrow-size,
|
|
375
|
+
$c-combobox-arrow-offset: $arrow-offset,
|
|
376
|
+
$c-combobox-arrow-color: $arrow-color,
|
|
377
|
+
$c-combobox-arrow-color-hover: $arrow-color-active,
|
|
378
|
+
$c-combobox-arrow-color-open: $arrow-color-active,
|
|
379
|
+
$c-combobox-arrow-color-disabled: $arrow-color-disabled,
|
|
380
|
+
$c-combobox-arrow-transition: $arrow-transition,
|
|
381
|
+
$c-combobox-arrow-rotate-open: $arrow-rotate-open
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
// Upload: the Input field with a dashed box as the dropzone. Its index forwards the input styles, already loaded and
|
|
385
|
+
// configured above, so it must come after them.
|
|
386
|
+
@use '@carissa-io/components-upload/scss' as upload with (
|
|
387
|
+
// Box: dashed 1px #737373 (the input border), black on hover and while files are dragged over it
|
|
388
|
+
$c-upload-border-style: dashed,
|
|
389
|
+
$c-upload-transition: (border-color $transition-duration ease, background-color $transition-duration ease, box-shadow $transition-duration ease, color $transition-duration ease),
|
|
390
|
+
$c-upload-dragging-border-color: $black,
|
|
391
|
+
$c-upload-dragging-background: $surface,
|
|
392
|
+
|
|
393
|
+
// Zone: a visible target with centered body text
|
|
394
|
+
$c-upload-zone-min-height: 5.5rem,
|
|
395
|
+
$c-upload-zone-padding: 0.75rem 0,
|
|
396
|
+
$c-upload-zone-color: $muted,
|
|
397
|
+
$c-upload-zone-text-align: center,
|
|
398
|
+
|
|
399
|
+
// Files: 44px rows split by a 1px light line
|
|
400
|
+
$c-upload-file-min-height: $min-height,
|
|
401
|
+
$c-upload-file-padding: 0,
|
|
402
|
+
$c-upload-file-separator-color: $surface-active,
|
|
403
|
+
$c-upload-file-name-font-size: 1rem,
|
|
404
|
+
$c-upload-file-name-color: $text,
|
|
405
|
+
|
|
406
|
+
// Remove button: 44px square, muted icon turning black, 1px black focus ring
|
|
407
|
+
$c-upload-remove-size: 2.75rem,
|
|
408
|
+
$c-upload-remove-color: $muted,
|
|
409
|
+
$c-upload-remove-color-hover: $black,
|
|
410
|
+
$c-upload-remove-radius: $radius,
|
|
411
|
+
$c-upload-remove-focus-color: $focus-color,
|
|
412
|
+
$c-upload-remove-focus-width: $focus-width,
|
|
413
|
+
$c-upload-remove-focus-offset: -1px
|
|
414
|
+
);
|
|
415
|
+
|
|
416
|
+
// Calendar: a standalone month grid (the date picker puts it inside the Popover panel, which brings its own border), so
|
|
417
|
+
// it has no outer border. Days are 44px squares; the labels use the uppercase tracked 11px label style.
|
|
418
|
+
@use '@carissa-io/components-calendar/scss' as calendar with (
|
|
419
|
+
// Typography
|
|
420
|
+
$c-calendar-font-family: $font-family,
|
|
421
|
+
$c-calendar-font-size: 1rem,
|
|
422
|
+
$c-calendar-transition: (background-color $transition-duration ease, color $transition-duration ease, border-color $transition-duration ease),
|
|
423
|
+
|
|
424
|
+
// Title: the label style, between the two 44px navigation buttons
|
|
425
|
+
$c-calendar-title-font-size: $label-font-size,
|
|
426
|
+
$c-calendar-title-font-weight: $label-font-weight,
|
|
427
|
+
$c-calendar-title-text-transform: uppercase,
|
|
428
|
+
$c-calendar-title-letter-spacing: $label-letter-spacing,
|
|
429
|
+
$c-calendar-title-color: $muted,
|
|
430
|
+
|
|
431
|
+
// Navigation: muted icon turning black, 1px black ring drawn inside
|
|
432
|
+
$c-calendar-nav-size: $min-height,
|
|
433
|
+
$c-calendar-nav-color: $muted,
|
|
434
|
+
$c-calendar-nav-color-hover: $black,
|
|
435
|
+
$c-calendar-nav-background-hover: transparent,
|
|
436
|
+
$c-calendar-nav-color-disabled: $disabled-text,
|
|
437
|
+
$c-calendar-nav-radius: $radius,
|
|
438
|
+
$c-calendar-nav-focus-color: $focus-color,
|
|
439
|
+
$c-calendar-nav-focus-width: $focus-width,
|
|
440
|
+
$c-calendar-nav-focus-offset: -1px,
|
|
441
|
+
|
|
442
|
+
// Weekday labels
|
|
443
|
+
$c-calendar-weekday-font-size: $label-font-size,
|
|
444
|
+
$c-calendar-weekday-font-weight: $label-font-weight,
|
|
445
|
+
$c-calendar-weekday-text-transform: uppercase,
|
|
446
|
+
$c-calendar-weekday-letter-spacing: $label-letter-spacing,
|
|
447
|
+
$c-calendar-weekday-color: $muted,
|
|
448
|
+
|
|
449
|
+
// Days: 44px squares in body text, light hover surface
|
|
450
|
+
$c-calendar-day-width: $min-height,
|
|
451
|
+
$c-calendar-day-height: $min-height,
|
|
452
|
+
$c-calendar-day-font-size: 1rem,
|
|
453
|
+
$c-calendar-day-color: $text,
|
|
454
|
+
$c-calendar-day-radius: $radius,
|
|
455
|
+
$c-calendar-day-color-hover: $text,
|
|
456
|
+
$c-calendar-day-background-hover: $surface,
|
|
457
|
+
$c-calendar-selected-color: $white,
|
|
458
|
+
$c-calendar-selected-background: $black,
|
|
459
|
+
$c-calendar-selected-border-color: $black,
|
|
460
|
+
$c-calendar-today-border-width: 1px,
|
|
461
|
+
$c-calendar-today-border-color: $black,
|
|
462
|
+
$c-calendar-disabled-color: $disabled-text,
|
|
463
|
+
|
|
464
|
+
// Focus: 1px black ring drawn inside the day so it is not clipped
|
|
465
|
+
$c-calendar-focus-color: $focus-color,
|
|
466
|
+
$c-calendar-focus-width: $focus-width,
|
|
467
|
+
$c-calendar-focus-offset: -1px
|
|
468
|
+
);
|
|
469
|
+
|
|
470
|
+
// Date picker: the Select field with a calendar panel and a calendar icon in place of the chevron (same muted icon that
|
|
471
|
+
// turns black on hover and when open). Its index forwards input, popover and calendar, already configured above: keep
|
|
472
|
+
// this block after them. The panel gets a little padding so the calendar does not touch the Popover's border.
|
|
473
|
+
@use '@carissa-io/components-date-picker/scss' as date-picker with (
|
|
474
|
+
// Trigger: body text, placeholder in the same muted tone as the input placeholder
|
|
475
|
+
$c-date-picker-trigger-color: $text,
|
|
476
|
+
$c-date-picker-placeholder-color: $muted,
|
|
477
|
+
$c-date-picker-trigger-min-height: 1.5em,
|
|
478
|
+
|
|
479
|
+
// Panel
|
|
480
|
+
$c-date-picker-panel-padding: 0.5rem,
|
|
481
|
+
|
|
482
|
+
// Icon: the arrow's size, offset and colors, without the rotation
|
|
483
|
+
$c-date-picker-icon-size: $arrow-size,
|
|
484
|
+
$c-date-picker-icon-offset: $arrow-offset,
|
|
485
|
+
$c-date-picker-icon-color: $arrow-color,
|
|
486
|
+
$c-date-picker-icon-color-hover: $arrow-color-active,
|
|
487
|
+
$c-date-picker-icon-color-open: $arrow-color-active,
|
|
488
|
+
$c-date-picker-icon-color-disabled: $arrow-color-disabled,
|
|
489
|
+
$c-date-picker-icon-transition: color $transition-duration ease,
|
|
490
|
+
|
|
491
|
+
// Open: the focused border
|
|
492
|
+
$c-date-picker-open-border-color: $focus-color
|
|
493
|
+
);
|
|
494
|
+
|
|
495
|
+
// Search: the Input with a leading icon and a clear button built on the input's start/end slots. Its index forwards the
|
|
496
|
+
// input styles, already configured above: keep this block after them. The icon is 20px muted (black while the field has
|
|
497
|
+
// the focus); the clear icon is 16px muted turning black on hover.
|
|
498
|
+
@use '@carissa-io/components-search/scss' as search with (
|
|
499
|
+
// Search icon
|
|
500
|
+
$c-search-icon-size: 1.25rem,
|
|
501
|
+
$c-search-icon-color: $muted,
|
|
502
|
+
$c-search-icon-color-focus: $black,
|
|
503
|
+
|
|
504
|
+
// Clear button
|
|
505
|
+
$c-search-clear-icon-size: 1rem,
|
|
506
|
+
$c-search-clear-color: $muted,
|
|
507
|
+
$c-search-clear-color-hover: $black,
|
|
508
|
+
|
|
509
|
+
// Motion
|
|
510
|
+
$c-search-transition: color $transition-duration ease
|
|
511
|
+
);
|