@optiaxiom/proteus 0.1.4 → 0.1.5

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.
@@ -93,8 +93,6 @@ const ProteusElement = ({
93
93
  return /* @__PURE__ */ jsx(Group, { ...resolve(element) });
94
94
  case "Heading":
95
95
  return /* @__PURE__ */ jsx(Heading, { ...resolve(element) });
96
- case "Icon":
97
- return /* @__PURE__ */ jsx(Box, { asChild: true, ...resolve(element), children: /* @__PURE__ */ jsx("img", {}) });
98
96
  case "IconCalendar":
99
97
  return /* @__PURE__ */ jsx(Box, { asChild: true, ...resolve(element), children: /* @__PURE__ */ jsx(IconCalendar, {}) });
100
98
  case "Image":
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { Box, Spinner, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogBody, DialogFooter, DialogClose, Button } from '@optiaxiom/react';
4
4
  import { useState, useRef } from 'react';
5
5
  import { downloadFile } from './downloadFile.js';
@@ -9,6 +9,9 @@ function ProteusImage(props) {
9
9
  const [isDownloading, setIsDownloading] = useState(false);
10
10
  const [isLoaded, setIsLoaded] = useState(false);
11
11
  const imgRef = useRef(null);
12
+ if (props.objectFit === "cover") {
13
+ return /* @__PURE__ */ jsx(Box, { asChild: true, objectFit: "cover", overflow: "hidden", ...props, children: /* @__PURE__ */ jsx("img", { alt: props.alt, src: props.src }) });
14
+ }
12
15
  return /* @__PURE__ */ jsxs(Fragment, { children: [
13
16
  !isLoaded && /* @__PURE__ */ jsx(
14
17
  Box,
@@ -2677,9 +2677,6 @@ var definitions = {
2677
2677
  {
2678
2678
  $ref: "#/definitions/ProteusHeading"
2679
2679
  },
2680
- {
2681
- $ref: "#/definitions/ProteusIcon"
2682
- },
2683
2680
  {
2684
2681
  $ref: "#/definitions/ProteusIconCalendar"
2685
2682
  },
@@ -5292,203 +5289,6 @@ var definitions = {
5292
5289
  ],
5293
5290
  type: "object"
5294
5291
  },
5295
- ProteusIcon: {
5296
- additionalProperties: false,
5297
- properties: {
5298
- $type: {
5299
- "const": "Icon"
5300
- },
5301
- alignItems: {
5302
- $ref: "#/definitions/SprinkleProp_alignItems"
5303
- },
5304
- alignSelf: {
5305
- $ref: "#/definitions/SprinkleProp_alignSelf"
5306
- },
5307
- animation: {
5308
- $ref: "#/definitions/SprinkleProp_animation"
5309
- },
5310
- backgroundImage: {
5311
- $ref: "#/definitions/SprinkleProp_backgroundImage"
5312
- },
5313
- bg: {
5314
- $ref: "#/definitions/SprinkleProp_bg"
5315
- },
5316
- border: {
5317
- $ref: "#/definitions/SprinkleProp_border"
5318
- },
5319
- borderB: {
5320
- $ref: "#/definitions/SprinkleProp_borderB"
5321
- },
5322
- borderColor: {
5323
- $ref: "#/definitions/SprinkleProp_borderColor"
5324
- },
5325
- borderL: {
5326
- $ref: "#/definitions/SprinkleProp_borderL"
5327
- },
5328
- borderR: {
5329
- $ref: "#/definitions/SprinkleProp_borderR"
5330
- },
5331
- borderT: {
5332
- $ref: "#/definitions/SprinkleProp_borderT"
5333
- },
5334
- color: {
5335
- $ref: "#/definitions/SprinkleProp_color"
5336
- },
5337
- cursor: {
5338
- $ref: "#/definitions/SprinkleProp_cursor"
5339
- },
5340
- display: {
5341
- $ref: "#/definitions/SprinkleProp_display"
5342
- },
5343
- flex: {
5344
- $ref: "#/definitions/SprinkleProp_flex"
5345
- },
5346
- flexDirection: {
5347
- $ref: "#/definitions/SprinkleProp_flexDirection"
5348
- },
5349
- flexWrap: {
5350
- $ref: "#/definitions/SprinkleProp_flexWrap"
5351
- },
5352
- fontFamily: {
5353
- $ref: "#/definitions/SprinkleProp_fontFamily"
5354
- },
5355
- fontSize: {
5356
- $ref: "#/definitions/SprinkleProp_fontSize"
5357
- },
5358
- fontWeight: {
5359
- $ref: "#/definitions/SprinkleProp_fontWeight"
5360
- },
5361
- gap: {
5362
- $ref: "#/definitions/SprinkleProp_gap"
5363
- },
5364
- gridAutoRows: {
5365
- $ref: "#/definitions/SprinkleProp_gridAutoRows"
5366
- },
5367
- gridColumn: {
5368
- $ref: "#/definitions/SprinkleProp_gridColumn"
5369
- },
5370
- gridTemplateColumns: {
5371
- $ref: "#/definitions/SprinkleProp_gridTemplateColumns"
5372
- },
5373
- h: {
5374
- $ref: "#/definitions/SprinkleProp_h"
5375
- },
5376
- justifyContent: {
5377
- $ref: "#/definitions/SprinkleProp_justifyContent"
5378
- },
5379
- justifyItems: {
5380
- $ref: "#/definitions/SprinkleProp_justifyItems"
5381
- },
5382
- m: {
5383
- $ref: "#/definitions/SprinkleProp_m"
5384
- },
5385
- maxH: {
5386
- $ref: "#/definitions/SprinkleProp_maxH"
5387
- },
5388
- maxW: {
5389
- $ref: "#/definitions/SprinkleProp_maxW"
5390
- },
5391
- mb: {
5392
- $ref: "#/definitions/SprinkleProp_mb"
5393
- },
5394
- ml: {
5395
- $ref: "#/definitions/SprinkleProp_ml"
5396
- },
5397
- mr: {
5398
- $ref: "#/definitions/SprinkleProp_mr"
5399
- },
5400
- mt: {
5401
- $ref: "#/definitions/SprinkleProp_mt"
5402
- },
5403
- mx: {
5404
- $ref: "#/definitions/SprinkleProp_mx"
5405
- },
5406
- my: {
5407
- $ref: "#/definitions/SprinkleProp_my"
5408
- },
5409
- objectFit: {
5410
- $ref: "#/definitions/SprinkleProp_objectFit"
5411
- },
5412
- overflow: {
5413
- $ref: "#/definitions/SprinkleProp_overflow"
5414
- },
5415
- overflowX: {
5416
- $ref: "#/definitions/SprinkleProp_overflowX"
5417
- },
5418
- overflowY: {
5419
- $ref: "#/definitions/SprinkleProp_overflowY"
5420
- },
5421
- p: {
5422
- $ref: "#/definitions/SprinkleProp_p"
5423
- },
5424
- pb: {
5425
- $ref: "#/definitions/SprinkleProp_pb"
5426
- },
5427
- pl: {
5428
- $ref: "#/definitions/SprinkleProp_pl"
5429
- },
5430
- placeItems: {
5431
- $ref: "#/definitions/SprinkleProp_placeItems"
5432
- },
5433
- pointerEvents: {
5434
- $ref: "#/definitions/SprinkleProp_pointerEvents"
5435
- },
5436
- pr: {
5437
- $ref: "#/definitions/SprinkleProp_pr"
5438
- },
5439
- pt: {
5440
- $ref: "#/definitions/SprinkleProp_pt"
5441
- },
5442
- px: {
5443
- $ref: "#/definitions/SprinkleProp_px"
5444
- },
5445
- py: {
5446
- $ref: "#/definitions/SprinkleProp_py"
5447
- },
5448
- rounded: {
5449
- $ref: "#/definitions/SprinkleProp_rounded"
5450
- },
5451
- shadow: {
5452
- $ref: "#/definitions/SprinkleProp_shadow"
5453
- },
5454
- size: {
5455
- $ref: "#/definitions/SprinkleProp_size"
5456
- },
5457
- textAlign: {
5458
- $ref: "#/definitions/SprinkleProp_textAlign"
5459
- },
5460
- textTransform: {
5461
- $ref: "#/definitions/SprinkleProp_textTransform"
5462
- },
5463
- transition: {
5464
- $ref: "#/definitions/SprinkleProp_transition"
5465
- },
5466
- w: {
5467
- $ref: "#/definitions/SprinkleProp_w"
5468
- },
5469
- whiteSpace: {
5470
- $ref: "#/definitions/SprinkleProp_whiteSpace"
5471
- },
5472
- z: {
5473
- $ref: "#/definitions/SprinkleProp_z"
5474
- },
5475
- src: {
5476
- anyOf: [
5477
- {
5478
- $ref: "#/definitions/ProteusValue"
5479
- },
5480
- {
5481
- type: "string"
5482
- }
5483
- ],
5484
- description: "The icon source URL"
5485
- }
5486
- },
5487
- required: [
5488
- "$type"
5489
- ],
5490
- type: "object"
5491
- },
5492
5292
  ProteusIconCalendar: {
5493
5293
  additionalProperties: false,
5494
5294
  properties: {
@@ -2666,9 +2666,6 @@ var definitions = {
2666
2666
  {
2667
2667
  $ref: "#/definitions/ProteusHeading"
2668
2668
  },
2669
- {
2670
- $ref: "#/definitions/ProteusIcon"
2671
- },
2672
2669
  {
2673
2670
  $ref: "#/definitions/ProteusIconCalendar"
2674
2671
  },
@@ -5261,202 +5258,6 @@ var definitions = {
5261
5258
  ],
5262
5259
  type: "object"
5263
5260
  },
5264
- ProteusIcon: {
5265
- properties: {
5266
- $type: {
5267
- "const": "Icon"
5268
- },
5269
- alignItems: {
5270
- $ref: "#/definitions/SprinkleProp_alignItems"
5271
- },
5272
- alignSelf: {
5273
- $ref: "#/definitions/SprinkleProp_alignSelf"
5274
- },
5275
- animation: {
5276
- $ref: "#/definitions/SprinkleProp_animation"
5277
- },
5278
- backgroundImage: {
5279
- $ref: "#/definitions/SprinkleProp_backgroundImage"
5280
- },
5281
- bg: {
5282
- $ref: "#/definitions/SprinkleProp_bg"
5283
- },
5284
- border: {
5285
- $ref: "#/definitions/SprinkleProp_border"
5286
- },
5287
- borderB: {
5288
- $ref: "#/definitions/SprinkleProp_borderB"
5289
- },
5290
- borderColor: {
5291
- $ref: "#/definitions/SprinkleProp_borderColor"
5292
- },
5293
- borderL: {
5294
- $ref: "#/definitions/SprinkleProp_borderL"
5295
- },
5296
- borderR: {
5297
- $ref: "#/definitions/SprinkleProp_borderR"
5298
- },
5299
- borderT: {
5300
- $ref: "#/definitions/SprinkleProp_borderT"
5301
- },
5302
- color: {
5303
- $ref: "#/definitions/SprinkleProp_color"
5304
- },
5305
- cursor: {
5306
- $ref: "#/definitions/SprinkleProp_cursor"
5307
- },
5308
- display: {
5309
- $ref: "#/definitions/SprinkleProp_display"
5310
- },
5311
- flex: {
5312
- $ref: "#/definitions/SprinkleProp_flex"
5313
- },
5314
- flexDirection: {
5315
- $ref: "#/definitions/SprinkleProp_flexDirection"
5316
- },
5317
- flexWrap: {
5318
- $ref: "#/definitions/SprinkleProp_flexWrap"
5319
- },
5320
- fontFamily: {
5321
- $ref: "#/definitions/SprinkleProp_fontFamily"
5322
- },
5323
- fontSize: {
5324
- $ref: "#/definitions/SprinkleProp_fontSize"
5325
- },
5326
- fontWeight: {
5327
- $ref: "#/definitions/SprinkleProp_fontWeight"
5328
- },
5329
- gap: {
5330
- $ref: "#/definitions/SprinkleProp_gap"
5331
- },
5332
- gridAutoRows: {
5333
- $ref: "#/definitions/SprinkleProp_gridAutoRows"
5334
- },
5335
- gridColumn: {
5336
- $ref: "#/definitions/SprinkleProp_gridColumn"
5337
- },
5338
- gridTemplateColumns: {
5339
- $ref: "#/definitions/SprinkleProp_gridTemplateColumns"
5340
- },
5341
- h: {
5342
- $ref: "#/definitions/SprinkleProp_h"
5343
- },
5344
- justifyContent: {
5345
- $ref: "#/definitions/SprinkleProp_justifyContent"
5346
- },
5347
- justifyItems: {
5348
- $ref: "#/definitions/SprinkleProp_justifyItems"
5349
- },
5350
- m: {
5351
- $ref: "#/definitions/SprinkleProp_m"
5352
- },
5353
- maxH: {
5354
- $ref: "#/definitions/SprinkleProp_maxH"
5355
- },
5356
- maxW: {
5357
- $ref: "#/definitions/SprinkleProp_maxW"
5358
- },
5359
- mb: {
5360
- $ref: "#/definitions/SprinkleProp_mb"
5361
- },
5362
- ml: {
5363
- $ref: "#/definitions/SprinkleProp_ml"
5364
- },
5365
- mr: {
5366
- $ref: "#/definitions/SprinkleProp_mr"
5367
- },
5368
- mt: {
5369
- $ref: "#/definitions/SprinkleProp_mt"
5370
- },
5371
- mx: {
5372
- $ref: "#/definitions/SprinkleProp_mx"
5373
- },
5374
- my: {
5375
- $ref: "#/definitions/SprinkleProp_my"
5376
- },
5377
- objectFit: {
5378
- $ref: "#/definitions/SprinkleProp_objectFit"
5379
- },
5380
- overflow: {
5381
- $ref: "#/definitions/SprinkleProp_overflow"
5382
- },
5383
- overflowX: {
5384
- $ref: "#/definitions/SprinkleProp_overflowX"
5385
- },
5386
- overflowY: {
5387
- $ref: "#/definitions/SprinkleProp_overflowY"
5388
- },
5389
- p: {
5390
- $ref: "#/definitions/SprinkleProp_p"
5391
- },
5392
- pb: {
5393
- $ref: "#/definitions/SprinkleProp_pb"
5394
- },
5395
- pl: {
5396
- $ref: "#/definitions/SprinkleProp_pl"
5397
- },
5398
- placeItems: {
5399
- $ref: "#/definitions/SprinkleProp_placeItems"
5400
- },
5401
- pointerEvents: {
5402
- $ref: "#/definitions/SprinkleProp_pointerEvents"
5403
- },
5404
- pr: {
5405
- $ref: "#/definitions/SprinkleProp_pr"
5406
- },
5407
- pt: {
5408
- $ref: "#/definitions/SprinkleProp_pt"
5409
- },
5410
- px: {
5411
- $ref: "#/definitions/SprinkleProp_px"
5412
- },
5413
- py: {
5414
- $ref: "#/definitions/SprinkleProp_py"
5415
- },
5416
- rounded: {
5417
- $ref: "#/definitions/SprinkleProp_rounded"
5418
- },
5419
- shadow: {
5420
- $ref: "#/definitions/SprinkleProp_shadow"
5421
- },
5422
- size: {
5423
- $ref: "#/definitions/SprinkleProp_size"
5424
- },
5425
- textAlign: {
5426
- $ref: "#/definitions/SprinkleProp_textAlign"
5427
- },
5428
- textTransform: {
5429
- $ref: "#/definitions/SprinkleProp_textTransform"
5430
- },
5431
- transition: {
5432
- $ref: "#/definitions/SprinkleProp_transition"
5433
- },
5434
- w: {
5435
- $ref: "#/definitions/SprinkleProp_w"
5436
- },
5437
- whiteSpace: {
5438
- $ref: "#/definitions/SprinkleProp_whiteSpace"
5439
- },
5440
- z: {
5441
- $ref: "#/definitions/SprinkleProp_z"
5442
- },
5443
- src: {
5444
- anyOf: [
5445
- {
5446
- $ref: "#/definitions/ProteusValue"
5447
- },
5448
- {
5449
- type: "string"
5450
- }
5451
- ],
5452
- description: "The icon source URL"
5453
- }
5454
- },
5455
- required: [
5456
- "$type"
5457
- ],
5458
- type: "object"
5459
- },
5460
5261
  ProteusIconCalendar: {
5461
5262
  properties: {
5462
5263
  $type: {