@geckoui/geckoui 0.0.1-beta0 → 1.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.
package/dist/index.js CHANGED
@@ -376,11 +376,18 @@ var BaseFilePickerHandler = class {
376
376
  newFile.editableName = newFile.name;
377
377
  newFile.path || (newFile.path = path);
378
378
  if (this.accept !== "*") {
379
- if (this.accept.includes(",")) {
380
- const acceptTypes = this.accept.split(",").map((type2) => type2.trim());
381
- const valid = acceptTypes.some((acceptType) => newFile.type.match(acceptType));
382
- if (!valid) return data;
383
- } else if (!RegExp(this.accept).exec(newFile.type)) return data;
379
+ const acceptTypes = this.accept.split(",").map((t) => t.trim());
380
+ const valid = acceptTypes.some((acceptType) => {
381
+ if (acceptType.startsWith(".")) {
382
+ return newFile.name.toLowerCase().endsWith(acceptType.toLowerCase());
383
+ }
384
+ if (acceptType.endsWith("/*")) {
385
+ const baseType = acceptType.slice(0, -2);
386
+ return newFile.type.startsWith(baseType + "/");
387
+ }
388
+ return newFile.type === acceptType;
389
+ });
390
+ if (!valid) return data;
384
391
  }
385
392
  newFile.preview = URL.createObjectURL(newFile);
386
393
  data.push(newFile);
@@ -499,7 +506,7 @@ var WebkitFilePickerHandler_default = WebkitFilePickerHandler;
499
506
  var FileOnlyPickerHandler = class extends BaseFilePickerHandler_default {
500
507
  onDrop(items) {
501
508
  return __async(this, null, function* () {
502
- const files = Array.from(items != null ? items : []).map((item) => item.getAsFile()).filter((file) => Boolean(file) && (file == null ? void 0 : file.type));
509
+ const files = Array.from(items != null ? items : []).map((item) => item.getAsFile()).filter((file) => Boolean(file));
503
510
  const data = this.oldFiles;
504
511
  for (const file of files) {
505
512
  yield this.addFileIfValid(file, data);
package/dist/index.mjs CHANGED
@@ -273,11 +273,18 @@ var BaseFilePickerHandler = class {
273
273
  newFile.editableName = newFile.name;
274
274
  newFile.path || (newFile.path = path);
275
275
  if (this.accept !== "*") {
276
- if (this.accept.includes(",")) {
277
- const acceptTypes = this.accept.split(",").map((type2) => type2.trim());
278
- const valid = acceptTypes.some((acceptType) => newFile.type.match(acceptType));
279
- if (!valid) return data;
280
- } else if (!RegExp(this.accept).exec(newFile.type)) return data;
276
+ const acceptTypes = this.accept.split(",").map((t) => t.trim());
277
+ const valid = acceptTypes.some((acceptType) => {
278
+ if (acceptType.startsWith(".")) {
279
+ return newFile.name.toLowerCase().endsWith(acceptType.toLowerCase());
280
+ }
281
+ if (acceptType.endsWith("/*")) {
282
+ const baseType = acceptType.slice(0, -2);
283
+ return newFile.type.startsWith(baseType + "/");
284
+ }
285
+ return newFile.type === acceptType;
286
+ });
287
+ if (!valid) return data;
281
288
  }
282
289
  newFile.preview = URL.createObjectURL(newFile);
283
290
  data.push(newFile);
@@ -396,7 +403,7 @@ var WebkitFilePickerHandler_default = WebkitFilePickerHandler;
396
403
  var FileOnlyPickerHandler = class extends BaseFilePickerHandler_default {
397
404
  onDrop(items) {
398
405
  return __async(this, null, function* () {
399
- const files = Array.from(items != null ? items : []).map((item) => item.getAsFile()).filter((file) => Boolean(file) && (file == null ? void 0 : file.type));
406
+ const files = Array.from(items != null ? items : []).map((item) => item.getAsFile()).filter((file) => Boolean(file));
400
407
  const data = this.oldFiles;
401
408
  for (const file of files) {
402
409
  yield this.addFileIfValid(file, data);
package/dist/styles.css CHANGED
@@ -2190,15 +2190,13 @@
2190
2190
  background: rgb(var(--gecko-ui-scrollbar-thumb-hover));
2191
2191
  }
2192
2192
  .GeckoUISelectMenu__items {
2193
- scrollbar-gutter: stable;
2193
+ scrollbar-gutter: stable overlay;
2194
2194
  display: flex;
2195
2195
  flex-direction: column;
2196
2196
  gap: 1px;
2197
2197
  overflow-y: auto;
2198
2198
  overscroll-behavior: contain;
2199
- padding-top: 0.5rem;
2200
- padding-bottom: 0.5rem;
2201
- padding-left: 0.5rem;
2199
+ padding: 0.5rem;
2202
2200
  }
2203
2201
  .GeckoUISelectMenu--with-dropdown-search {
2204
2202
  max-height: 260px;
@@ -3237,7 +3235,7 @@
3237
3235
  --gecko-ui-border-focus: 163 163 163;
3238
3236
  --gecko-ui-border-hover: 212 212 212;
3239
3237
  --gecko-ui-border-disabled: 235 235 235;
3240
- --gecko-ui-scrollbar-track: 0 0 0 / 0;
3238
+ --gecko-ui-scrollbar-track: 0 0 0;
3241
3239
  --gecko-ui-scrollbar-thumb: 209 213 219;
3242
3240
  --gecko-ui-scrollbar-thumb-hover: 156 163 175;
3243
3241
  }
@@ -3258,12 +3256,12 @@
3258
3256
  --gecko-ui-text-placeholder: 115 115 115;
3259
3257
  --gecko-ui-text-inverse: 23 23 23;
3260
3258
  --gecko-ui-text-muted: 163 163 163;
3261
- --gecko-ui-border-primary: 255 255 255 / 0.1;
3262
- --gecko-ui-border-secondary: 255 255 255 / 0.15;
3259
+ --gecko-ui-border-primary: 90 90 90;
3260
+ --gecko-ui-border-secondary: 90 90 90;
3263
3261
  --gecko-ui-border-focus: 115 115 115;
3264
3262
  --gecko-ui-border-hover: 163 163 163;
3265
- --gecko-ui-border-disabled: 255 255 255 / 0.1;
3266
- --gecko-ui-scrollbar-track: 0 0 0 / 0;
3263
+ --gecko-ui-border-disabled: 45 45 45;
3264
+ --gecko-ui-scrollbar-track: 0 0 0;
3267
3265
  --gecko-ui-scrollbar-thumb: 75 85 99;
3268
3266
  --gecko-ui-scrollbar-thumb-hover: 107 114 128;
3269
3267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geckoui/geckoui",
3
- "version": "0.0.1-beta0",
3
+ "version": "1.0.0",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],