@webstudio-is/sdk-components-react 0.151.0 → 0.167.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/lib/props.js CHANGED
@@ -3285,6 +3285,19 @@ var meta = {
3285
3285
  selector: "[aria-current=page]",
3286
3286
  label: "Current page"
3287
3287
  }
3288
+ ],
3289
+ template: [
3290
+ {
3291
+ type: "instance",
3292
+ component: "Link",
3293
+ children: [
3294
+ {
3295
+ type: "text",
3296
+ value: "Link text you can edit",
3297
+ placeholder: true
3298
+ }
3299
+ ]
3300
+ }
3288
3301
  ]
3289
3302
  };
3290
3303
  var propsMeta9 = {
@@ -6474,7 +6487,20 @@ var meta3 = {
6474
6487
  { selector: ":disabled", label: "Disabled" },
6475
6488
  { selector: ":enabled", label: "Enabled" }
6476
6489
  ],
6477
- order: 2
6490
+ order: 2,
6491
+ template: [
6492
+ {
6493
+ type: "instance",
6494
+ component: "Button",
6495
+ children: [
6496
+ {
6497
+ type: "text",
6498
+ value: "Button text you can edit",
6499
+ placeholder: true
6500
+ }
6501
+ ]
6502
+ }
6503
+ ]
6478
6504
  };
6479
6505
  var propsMeta16 = {
6480
6506
  props: props13,
@@ -13008,7 +13034,7 @@ var meta7 = {
13008
13034
  component: "Text",
13009
13035
  label: "Radio Label",
13010
13036
  props: [{ type: "string", name: "tag", value: "span" }],
13011
- children: [{ type: "text", value: "Radio" }]
13037
+ children: [{ type: "text", value: "Radio", placeholder: true }]
13012
13038
  }
13013
13039
  ]
13014
13040
  }
@@ -13741,7 +13767,7 @@ var meta8 = {
13741
13767
  component: "Text",
13742
13768
  label: "Checkbox Label",
13743
13769
  props: [{ type: "string", name: "tag", value: "span" }],
13744
- children: [{ type: "text", value: "Checkbox" }]
13770
+ children: [{ type: "text", value: "Checkbox", placeholder: true }]
13745
13771
  }
13746
13772
  ]
13747
13773
  }
@@ -16144,7 +16170,8 @@ import "@webstudio-is/react-sdk";
16144
16170
 
16145
16171
  // src/__generated__/xml-node.props.ts
16146
16172
  var props30 = {
16147
- tag: { required: false, control: "text", type: "string", defaultValue: "" }
16173
+ tag: { required: false, control: "text", type: "string", defaultValue: "" },
16174
+ xmlns: { required: false, control: "text", type: "string" }
16148
16175
  };
16149
16176
 
16150
16177
  // src/xml-node.ws.ts
@@ -16152,6 +16179,330 @@ var propsMeta33 = {
16152
16179
  props: props30,
16153
16180
  initialProps: ["tag"]
16154
16181
  };
16182
+
16183
+ // src/time.ws.ts
16184
+ import { CalendarIcon } from "@webstudio-is/icons/svg";
16185
+ import {
16186
+ defaultStates as defaultStates28
16187
+ } from "@webstudio-is/react-sdk";
16188
+ import { time } from "@webstudio-is/react-sdk/css-normalize";
16189
+
16190
+ // src/__generated__/time.props.ts
16191
+ var props31 = {
16192
+ country: {
16193
+ required: false,
16194
+ control: "select",
16195
+ type: "string",
16196
+ defaultValue: "GB",
16197
+ options: [
16198
+ "AF",
16199
+ "AL",
16200
+ "DZ",
16201
+ "AS",
16202
+ "AD",
16203
+ "AO",
16204
+ "AI",
16205
+ "AQ",
16206
+ "AG",
16207
+ "AR",
16208
+ "AM",
16209
+ "AW",
16210
+ "AU",
16211
+ "AT",
16212
+ "AZ",
16213
+ "BS",
16214
+ "BH",
16215
+ "BD",
16216
+ "BB",
16217
+ "BY",
16218
+ "BE",
16219
+ "BZ",
16220
+ "BJ",
16221
+ "BM",
16222
+ "BT",
16223
+ "BO",
16224
+ "BA",
16225
+ "BW",
16226
+ "BR",
16227
+ "BN",
16228
+ "BG",
16229
+ "BF",
16230
+ "BI",
16231
+ "CV",
16232
+ "KH",
16233
+ "CM",
16234
+ "CA",
16235
+ "KY",
16236
+ "CF",
16237
+ "TD",
16238
+ "CL",
16239
+ "CN",
16240
+ "CO",
16241
+ "KM",
16242
+ "CG",
16243
+ "CD",
16244
+ "CR",
16245
+ "HR",
16246
+ "CU",
16247
+ "CY",
16248
+ "CZ",
16249
+ "DK",
16250
+ "DJ",
16251
+ "DM",
16252
+ "DO",
16253
+ "EC",
16254
+ "EG",
16255
+ "SV",
16256
+ "GQ",
16257
+ "ER",
16258
+ "EE",
16259
+ "SZ",
16260
+ "ET",
16261
+ "FJ",
16262
+ "FI",
16263
+ "FR",
16264
+ "GA",
16265
+ "GM",
16266
+ "GE",
16267
+ "DE",
16268
+ "GH",
16269
+ "GR",
16270
+ "GD",
16271
+ "GT",
16272
+ "GN",
16273
+ "GW",
16274
+ "GY",
16275
+ "HT",
16276
+ "HN",
16277
+ "HU",
16278
+ "IS",
16279
+ "IN",
16280
+ "ID",
16281
+ "IR",
16282
+ "IQ",
16283
+ "IE",
16284
+ "IL",
16285
+ "IT",
16286
+ "JM",
16287
+ "JP",
16288
+ "JO",
16289
+ "KZ",
16290
+ "KE",
16291
+ "KI",
16292
+ "KP",
16293
+ "KR",
16294
+ "KW",
16295
+ "KG",
16296
+ "LA",
16297
+ "LV",
16298
+ "LB",
16299
+ "LS",
16300
+ "LR",
16301
+ "LY",
16302
+ "LI",
16303
+ "LT",
16304
+ "LU",
16305
+ "MG",
16306
+ "MW",
16307
+ "MY",
16308
+ "MV",
16309
+ "ML",
16310
+ "MT",
16311
+ "MH",
16312
+ "MR",
16313
+ "MU",
16314
+ "MX",
16315
+ "FM",
16316
+ "MD",
16317
+ "MC",
16318
+ "MN",
16319
+ "ME",
16320
+ "MA",
16321
+ "MZ",
16322
+ "MM",
16323
+ "NA",
16324
+ "NR",
16325
+ "NP",
16326
+ "NL",
16327
+ "NZ",
16328
+ "NI",
16329
+ "NE",
16330
+ "NG",
16331
+ "NO",
16332
+ "OM",
16333
+ "PK",
16334
+ "PW",
16335
+ "PA",
16336
+ "PG",
16337
+ "PY",
16338
+ "PE",
16339
+ "PH",
16340
+ "PL",
16341
+ "PT",
16342
+ "QA",
16343
+ "RO",
16344
+ "RU",
16345
+ "RW",
16346
+ "KN",
16347
+ "LC",
16348
+ "VC",
16349
+ "WS",
16350
+ "SM",
16351
+ "ST",
16352
+ "SA",
16353
+ "SN",
16354
+ "RS",
16355
+ "SC",
16356
+ "SL",
16357
+ "SG",
16358
+ "SK",
16359
+ "SI",
16360
+ "SB",
16361
+ "SO",
16362
+ "ZA",
16363
+ "SS",
16364
+ "ES",
16365
+ "LK",
16366
+ "SD",
16367
+ "SR",
16368
+ "SE",
16369
+ "CH",
16370
+ "SY",
16371
+ "TW",
16372
+ "TJ",
16373
+ "TZ",
16374
+ "TH",
16375
+ "TL",
16376
+ "TG",
16377
+ "TO",
16378
+ "TT",
16379
+ "TN",
16380
+ "TR",
16381
+ "TM",
16382
+ "TV",
16383
+ "UG",
16384
+ "UA",
16385
+ "AE",
16386
+ "GB",
16387
+ "US",
16388
+ "UY",
16389
+ "UZ",
16390
+ "VU",
16391
+ "VA",
16392
+ "VE",
16393
+ "VN",
16394
+ "YE",
16395
+ "ZM",
16396
+ "ZW"
16397
+ ]
16398
+ },
16399
+ dateStyle: {
16400
+ required: false,
16401
+ control: "select",
16402
+ type: "string",
16403
+ defaultValue: "medium",
16404
+ options: ["full", "long", "medium", "short", "none"]
16405
+ },
16406
+ datetime: {
16407
+ required: false,
16408
+ control: "text",
16409
+ type: "string",
16410
+ defaultValue: "dateTime attribute is not set"
16411
+ },
16412
+ language: {
16413
+ required: false,
16414
+ control: "select",
16415
+ type: "string",
16416
+ defaultValue: "en",
16417
+ options: [
16418
+ "hr",
16419
+ "th",
16420
+ "tr",
16421
+ "id",
16422
+ "is",
16423
+ "cy",
16424
+ "fr",
16425
+ "af",
16426
+ "am",
16427
+ "ar",
16428
+ "az",
16429
+ "be",
16430
+ "bg",
16431
+ "bn",
16432
+ "bs",
16433
+ "ca",
16434
+ "cs",
16435
+ "da",
16436
+ "de",
16437
+ "el",
16438
+ "en",
16439
+ "es",
16440
+ "et",
16441
+ "eu",
16442
+ "fa",
16443
+ "fi",
16444
+ "ga",
16445
+ "gl",
16446
+ "gu",
16447
+ "he",
16448
+ "hi",
16449
+ "hu",
16450
+ "hy",
16451
+ "it",
16452
+ "ja",
16453
+ "ka",
16454
+ "kk",
16455
+ "km",
16456
+ "kn",
16457
+ "ko",
16458
+ "ky",
16459
+ "lb",
16460
+ "lt",
16461
+ "lv",
16462
+ "mk",
16463
+ "ml",
16464
+ "mn",
16465
+ "mr",
16466
+ "ms",
16467
+ "mt",
16468
+ "nb",
16469
+ "nl",
16470
+ "nn",
16471
+ "pl",
16472
+ "pt",
16473
+ "ro",
16474
+ "ru",
16475
+ "si",
16476
+ "sk",
16477
+ "sl",
16478
+ "sq",
16479
+ "sr",
16480
+ "sv",
16481
+ "sw",
16482
+ "ta",
16483
+ "te",
16484
+ "uk",
16485
+ "ur",
16486
+ "uz",
16487
+ "vi",
16488
+ "zh"
16489
+ ],
16490
+ description: "Defines the script language used in the element."
16491
+ },
16492
+ timeStyle: {
16493
+ required: false,
16494
+ control: "select",
16495
+ type: "string",
16496
+ defaultValue: "none",
16497
+ options: ["full", "long", "medium", "short", "none"]
16498
+ }
16499
+ };
16500
+
16501
+ // src/time.ws.ts
16502
+ var propsMeta34 = {
16503
+ props: props31,
16504
+ initialProps: ["datetime", "language", "country", "dateStyle", "timeStyle"]
16505
+ };
16155
16506
  export {
16156
16507
  propsMeta20 as Blockquote,
16157
16508
  propsMeta4 as Body,
@@ -16181,6 +16532,7 @@ export {
16181
16532
  propsMeta14 as Superscript,
16182
16533
  propsMeta6 as Text,
16183
16534
  propsMeta26 as Textarea,
16535
+ propsMeta34 as Time,
16184
16536
  propsMeta29 as Vimeo,
16185
16537
  propsMeta31 as VimeoPlayButton,
16186
16538
  propsMeta30 as VimeoPreviewImage,
@@ -0,0 +1,2 @@
1
+ import type { PropMeta } from "@webstudio-is/react-sdk";
2
+ export declare const props: Record<string, PropMeta>;
@@ -0,0 +1,2 @@
1
+ import type { PropMeta } from "@webstudio-is/react-sdk";
2
+ export declare const props: Record<string, PropMeta>;
@@ -31,3 +31,4 @@ export { VimeoPreviewImage } from "./vimeo-preview-image";
31
31
  export { VimeoPlayButton } from "./vimeo-play-button";
32
32
  export { VimeoSpinner } from "./vimeo-spinner";
33
33
  export { XmlNode } from "./xml-node";
34
+ export { Time } from "./time";
@@ -0,0 +1,2 @@
1
+ import { type WsComponentMeta } from "@webstudio-is/react-sdk";
2
+ export declare const meta: WsComponentMeta;
@@ -6,6 +6,7 @@ type HtmlEmbedProps = {
6
6
  code: string;
7
7
  executeScriptOnCanvas?: boolean;
8
8
  clientOnly?: boolean;
9
+ children?: never;
9
10
  };
10
11
  export declare const HtmlEmbed: import("react").ForwardRefExoticComponent<HtmlEmbedProps & import("react").RefAttributes<HTMLDivElement>>;
11
12
  export {};
@@ -1,6 +1,7 @@
1
1
  export { meta as Slot } from "./slot.ws";
2
2
  export { meta as Fragment } from "./fragment.ws";
3
3
  export { meta as HtmlEmbed } from "./html-embed.ws";
4
+ export { meta as ContentEmbed } from "./content-embed.ws";
4
5
  export { meta as Body } from "./body.ws";
5
6
  export { meta as Box } from "./box.ws";
6
7
  export { meta as Text } from "./text.ws";
@@ -31,3 +32,4 @@ export { meta as VimeoPreviewImage } from "./vimeo-preview-image.ws";
31
32
  export { meta as VimeoPlayButton } from "./vimeo-play-button.ws";
32
33
  export { meta as VimeoSpinner } from "./vimeo-spinner.ws";
33
34
  export { meta as XmlNode } from "./xml-node.ws";
35
+ export { meta as Time } from "./time.ws";
@@ -31,3 +31,4 @@ export { propsMeta as VimeoPreviewImage } from "./vimeo-preview-image.ws";
31
31
  export { propsMeta as VimeoPlayButton } from "./vimeo-play-button.ws";
32
32
  export { propsMeta as VimeoSpinner } from "./vimeo-spinner.ws";
33
33
  export { propsMeta as XmlNode } from "./xml-node.ws";
34
+ export { propsMeta as Time } from "./time.ws";
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ declare const languages: readonly ["af", "am", "ar", "az", "be", "bg", "bn", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fr", "ga", "gl", "gu", "he", "hi", "hr", "hu", "hy", "id", "is", "it", "ja", "ka", "kk", "km", "kn", "ko", "ky", "lb", "lt", "lv", "mk", "ml", "mn", "mr", "ms", "mt", "nb", "nl", "nn", "pl", "pt", "ro", "ru", "si", "sk", "sl", "sq", "sr", "sv", "sw", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi", "zh"];
3
+ declare const countries: readonly ["AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BR", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CO", "KM", "CG", "CD", "CR", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FJ", "FI", "FR", "GA", "GM", "GE", "DE", "GH", "GR", "GD", "GT", "GN", "GW", "GY", "HT", "HN", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MR", "MU", "MX", "FM", "MD", "MC", "MN", "ME", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NZ", "NI", "NE", "NG", "NO", "OM", "PK", "PW", "PA", "PG", "PY", "PE", "PH", "PL", "PT", "QA", "RO", "RU", "RW", "KN", "LC", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "SS", "ES", "LK", "SD", "SR", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TO", "TT", "TN", "TR", "TM", "TV", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VA", "VE", "VN", "YE", "ZM", "ZW"];
4
+ type Language = (typeof languages)[number];
5
+ type Country = (typeof countries)[number];
6
+ type DateStyle = Intl.DateTimeFormatOptions["dateStyle"] | "none";
7
+ type TimeStyle = Intl.DateTimeFormatOptions["timeStyle"] | "none";
8
+ export type TimeProps = {
9
+ datetime?: string;
10
+ language?: Language;
11
+ country?: Country;
12
+ dateStyle?: DateStyle;
13
+ timeStyle?: TimeStyle;
14
+ };
15
+ export declare const Time: React.ForwardRefExoticComponent<TimeProps & React.RefAttributes<HTMLTimeElement>>;
16
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
2
+ export declare const meta: WsComponentMeta;
3
+ export declare const propsMeta: WsComponentPropsMeta;
@@ -1,8 +1,12 @@
1
+ import { idAttribute, componentAttribute } from "@webstudio-is/react-sdk";
1
2
  import { type ReactNode } from "react";
2
3
  export declare const defaultTag = "div";
3
4
  type Props = {
4
5
  tag: string;
6
+ xmlns?: string;
5
7
  children: ReactNode;
8
+ [idAttribute]: string;
9
+ [componentAttribute]: string;
6
10
  };
7
11
  export declare const XmlNode: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
8
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react",
3
- "version": "0.151.0",
3
+ "version": "0.167.0",
4
4
  "description": "Webstudio default library for react",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -16,20 +16,17 @@
16
16
  ".": {
17
17
  "webstudio": "./src/components.ts",
18
18
  "types": "./lib/types/components.d.ts",
19
- "import": "./lib/components.js",
20
- "require": "./lib/components.js"
19
+ "import": "./lib/components.js"
21
20
  },
22
21
  "./metas": {
23
22
  "webstudio": "./src/metas.ts",
24
23
  "types": "./lib/types/metas.d.ts",
25
- "import": "./lib/metas.js",
26
- "require": "./lib/metas.js"
24
+ "import": "./lib/metas.js"
27
25
  },
28
26
  "./props": {
29
27
  "webstudio": "./src/props.ts",
30
28
  "types": "./lib/types/props.d.ts",
31
- "import": "./lib/props.js",
32
- "require": "./lib/props.js"
29
+ "import": "./lib/props.js"
33
30
  }
34
31
  },
35
32
  "peerDependencies": {
@@ -39,15 +36,12 @@
39
36
  "dependencies": {
40
37
  "@react-aria/utils": "^3.21.0",
41
38
  "colord": "^2.9.3",
42
- "@webstudio-is/icons": "0.151.0",
43
- "@webstudio-is/image": "0.151.0",
44
- "@webstudio-is/react-sdk": "0.151.0"
39
+ "@webstudio-is/icons": "0.167.0",
40
+ "@webstudio-is/image": "0.167.0",
41
+ "@webstudio-is/react-sdk": "0.167.0"
45
42
  },
46
43
  "devDependencies": {
47
44
  "@jest/globals": "^29.7.0",
48
- "@storybook/addon-essentials": "^7.4.0",
49
- "@storybook/addon-links": "^7.4.0",
50
- "@storybook/react": "^7.4.0",
51
45
  "@testing-library/jest-dom": "^6.4.2",
52
46
  "@testing-library/react": "^14.2.2",
53
47
  "@types/react": "^18.2.70",
@@ -57,7 +51,6 @@
57
51
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
58
52
  "typescript": "5.4.5",
59
53
  "@webstudio-is/generate-arg-types": "0.0.0",
60
- "@webstudio-is/storybook-config": "0.0.0",
61
54
  "@webstudio-is/tsconfig": "1.0.7",
62
55
  "@webstudio-is/jest-config": "1.0.7"
63
56
  },
@@ -68,8 +61,6 @@
68
61
  "dts": "tsc --project tsconfig.dts.json",
69
62
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
70
63
  "typecheck": "tsc",
71
- "checks": "pnpm typecheck",
72
- "storybook:dev": "storybook dev -p 6006 --static-dir=./public",
73
- "storybook:build": "storybook build"
64
+ "checks": "pnpm typecheck"
74
65
  }
75
66
  }