@kakadu/components 1.1.7 → 1.1.8

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.
Files changed (2) hide show
  1. package/package.json +2 -8
  2. package/theme.tsx +0 -254
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kakadu/components",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Kakadu components library",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -256,11 +256,6 @@
256
256
  "import": "./build/theme.mjs",
257
257
  "require": "./build/theme.js"
258
258
  },
259
- "./theme.tsx": {
260
- "types": "./build/theme.d.ts",
261
- "import": "./build/theme.mjs",
262
- "require": "./build/theme.js"
263
- },
264
259
  "./icon": {
265
260
  "types": "./build/icon.d.ts",
266
261
  "import": "./build/icon.mjs",
@@ -374,8 +369,7 @@
374
369
  "./components.css": "./build/components.css"
375
370
  },
376
371
  "files": [
377
- "build",
378
- "theme.tsx"
372
+ "build"
379
373
  ],
380
374
  "publishConfig": {
381
375
  "access": "public"
package/theme.tsx DELETED
@@ -1,254 +0,0 @@
1
- import React from 'react';
2
- import {css, cx} from '@kuma-ui/core';
3
-
4
- export const lightBackgroundColor = '#f8fafc';
5
- export const darkBackgroundColor = '#0c0d12';
6
- export const greenColor = '#4ca486';
7
- export const font = {
8
- family: 'Inter, sans-serif',
9
- stylesheet:
10
- 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
11
- preconnect: [
12
- {url: 'https://fonts.googleapis.com'},
13
- {url: 'https://fonts.gstatic.com', crossorigin: true},
14
- ],
15
- };
16
-
17
- export function FontFamilyHeadLink() {
18
- return (
19
- <>
20
- {font.preconnect.map(({url, crossorigin}) => (
21
- <link
22
- key={url}
23
- href={url}
24
- rel="preconnect"
25
- crossOrigin={crossorigin ? 'anonymous' : undefined}
26
- />
27
- ))}
28
-
29
- <link href={font.stylesheet} rel="stylesheet" />
30
- </>
31
- );
32
- }
33
-
34
- const theme = css`
35
- --light-color: #f8fafc;
36
- --dark-color: #0c0d12;
37
-
38
- --background-color: var(--light-color);
39
- --foreground-color: var(--dark-color);
40
-
41
- --red-color: #be354b;
42
- --red-color-hover: #c73d56;
43
- --red-color-light: #e8687d;
44
-
45
- --yellow-color: #c9ac56;
46
- --yellow-color-hover: #d1b559;
47
- --yellow-color-light: #edcd71;
48
-
49
- --green-color: #52a14b;
50
- --green-color-hover: #5ea957;
51
- --green-color-light: #6fb86a;
52
-
53
- --primary-color: var(--green-color);
54
- --primary-color-hover: var(--green-color-hover);
55
-
56
- --secondary-color: #175694;
57
- --secondary-color-hover: #2c6195;
58
- --secondary-color-1: #222528;
59
- --secondary-color-2: #112a37;
60
- --secondary-color-3: #1e2f35;
61
- --secondary-color-4: #2c3238;
62
-
63
- --flash-color: rgba(255, 216, 57, 0.5);
64
- --font-weight-modifier: 50;
65
-
66
- &[data-theme='dark'] {
67
- --font-weight-modifier: 0;
68
-
69
- --background-color: var(--dark-color);
70
- --foreground-color: var(--light-color);
71
-
72
- --secondary-color: #cce0f0;
73
- --secondary-color-hover: #fff;
74
- --secondary-color-1: #edf0f2;
75
- --secondary-color-2: #e2e6eb;
76
- --secondary-color-3: #cbcdd0;
77
- --secondary-color-4: #fff;
78
- }
79
-
80
- --accent-font-family: 'Inter', -apple-system, helvetica, arial, sans-serif;
81
- --font-family: 'Inter', -apple-system, helvetica, arial, sans-serif;
82
-
83
- --gap: 16px;
84
-
85
- --scale-multiplier: 0.6;
86
- --quarter-gap: calc(var(--gap) / 4);
87
- --third-gap: calc(var(--gap) / 3);
88
- --half-gap: calc(var(--gap) / 2);
89
- --sesquialteral-gap: calc(var(--gap) * (1.5 * var(--scale-multiplier)));
90
- --double-gap: calc(var(--gap) * (2 * var(--scale-multiplier)));
91
- --triple-gap: calc(var(--gap) * (3 * var(--scale-multiplier)));
92
- --quadruple-gap: calc(var(--gap) * (4 * var(--scale-multiplier)));
93
-
94
- --sidebar-z-index: 424242;
95
- --modal-z-index: 424243;
96
-
97
- --page-padding: var(--gap);
98
-
99
- @media (min-width: 460px) {
100
- --scale-multiplier: 0.7;
101
- }
102
-
103
- @media (min-width: 580px) {
104
- --scale-multiplier: 0.8;
105
- --page-padding: var(--double-gap);
106
- }
107
-
108
- @media (min-width: 860px) {
109
- --scale-multiplier: 1;
110
- --page-padding: var(--triple-gap);
111
- }
112
-
113
- --page-width: calc(1080px + (var(--page-padding) * 2));
114
- --text-width: 780px;
115
- --content-width: 620px;
116
-
117
- font-family: var(--font-family);
118
- font-optical-sizing: auto;
119
- line-height: normal;
120
- color: var(--foreground-color);
121
-
122
- :global(:root) {
123
- background: var(--background-color);
124
- scroll-padding-top: 101px;
125
- }
126
-
127
- --8px: 0.5rem;
128
- --9px: 0.5625rem;
129
- --10px: 0.625rem;
130
- --11px: 0.6875rem;
131
- --12px: 0.75rem;
132
- --13px: 0.8125rem;
133
- --14px: 0.875rem;
134
- --15px: 0.9375rem;
135
- --16px: 1rem;
136
-
137
- --17px: 1.0625rem;
138
- --18px: 1.125rem;
139
- --19px: 1.1875rem;
140
- --20px: 1.25rem;
141
- --21px: 1.3125rem;
142
- --22px: 1.375rem;
143
- --23px: 1.4375rem;
144
- --24px: 1.5rem;
145
-
146
- --25px: 1.5625rem;
147
- --26px: 1.625rem;
148
- --27px: 1.6875rem;
149
- --28px: 1.75rem;
150
- --29px: 1.8125rem;
151
- --30px: 1.875rem;
152
- --31px: 1.9375rem;
153
- --32px: 2rem;
154
-
155
- --33px: 2.0625rem;
156
- --34px: 2.125rem;
157
- --35px: 2.1875rem;
158
- --36px: 2.25rem;
159
- --37px: 2.3125rem;
160
- --38px: 2.375rem;
161
- --39px: 2.4375rem;
162
- --40px: 2.5rem;
163
-
164
- --41px: 2.5625rem;
165
- --42px: 2.625rem;
166
- --43px: 2.6875rem;
167
- --44px: 2.75rem;
168
- --45px: 2.8125rem;
169
- --46px: 2.875rem;
170
- --47px: 2.9375rem;
171
- --48px: 3rem;
172
- `;
173
-
174
- export default theme;
175
-
176
- export const overflowProtectionStyles = css`
177
- overflow-wrap: anywhere;
178
- hyphens: auto;
179
- `;
180
-
181
- export const buttonResetStyles = css`
182
- appearance: none;
183
- background: transparent;
184
- text-align: left;
185
- border: 0;
186
- margin: 0;
187
- padding: 0;
188
- cursor: pointer;
189
-
190
- [dir='rtl'] & {
191
- text-align: right;
192
- }
193
- `;
194
-
195
- export const effectStyles = css`
196
- --soft-shadow-color: rgba(255, 255, 255, 0.375);
197
- --hard-shadow-color: rgba(0, 0, 0, 0.075);
198
- --inset-hard-shadow-color: rgba(0, 0, 0, 0.2);
199
- --box-shadow-outline-color: #fff;
200
- --box-shadow-color: rgba(0, 0, 0, 0.25);
201
- --box-shadow-highlight-color: rgba(255, 255, 255, 0.05);
202
- --box-shadow-top-highlight-color: var(--box-shadow-highlight-color);
203
- --box-shadow-inset-color: rgba(0, 0, 0, 0.25);
204
- --bevel-shadow-offset: 4px;
205
- --bevel-shadow-color: rgba(0, 0, 0, 0.1);
206
- --outline-color: rgba(0, 0, 0, 0);
207
- --outline-width: 0px;
208
-
209
- :where([data-theme='dark']) & {
210
- --soft-shadow-color: rgba(0, 0, 0, 0.375);
211
- --hard-shadow-color: rgba(0, 0, 0, 0.4);
212
- }
213
-
214
- box-shadow:
215
- 0 0 2px var(--soft-shadow-color),
216
- 0 0 0 1px var(--box-shadow-outline-color),
217
- 0 var(--bevel-shadow-offset) 0 var(--hard-shadow-color),
218
- inset 0 calc(var(--bevel-shadow-offset) * -1) 0 var(--bevel-shadow-color),
219
- inset 0 calc((var(--bevel-shadow-offset) + 1px) * -1) 0
220
- var(--box-shadow-highlight-color),
221
- 0 0 0 var(--outline-width) var(--outline-color);
222
-
223
- &:before {
224
- content: '';
225
- width: 100%;
226
- height: 100%;
227
- position: absolute;
228
- border-radius: var(--border-radius);
229
- top: 0;
230
- right: 0;
231
- bottom: 0;
232
- left: 0;
233
- mix-blend-mode: overlay;
234
-
235
- box-shadow:
236
- inset 0 0 0 1px var(--box-shadow-color),
237
- inset 0 2px 0 var(--box-shadow-top-highlight-color),
238
- inset 0 -2px 0 var(--box-shadow-highlight-color),
239
- inset 0 1px 0 var(--box-shadow-inset-color),
240
- inset 0 calc(var(--bevel-shadow-offset) * -1) 0
241
- var(--inset-hard-shadow-color);
242
- transition: box-shadow 0.37s;
243
- }
244
- `;
245
-
246
- export const nonInteractiveEffectStyles = cx(
247
- effectStyles,
248
- css`
249
- :where([data-theme='dark']) && {
250
- --box-shadow-outline-color: #07130e;
251
- --box-shadow-color: rgba(255, 255, 255, 0.2);
252
- }
253
- `
254
- );