@histoire/controls 0.7.8 → 0.8.1

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 (65) hide show
  1. package/dist/components/radio/HstRadio.story.vue.d.ts +2 -0
  2. package/dist/components/radio/HstRadio.vue.d.ts +24 -0
  3. package/dist/components/select/CustomSelect.vue.d.ts +3 -6
  4. package/dist/components/select/HstSelect.vue.d.ts +3 -4
  5. package/dist/index.d.ts +324 -2
  6. package/dist/index.es.js +498 -5133
  7. package/dist/style-standalone.css +31 -0
  8. package/dist/types.d.ts +4 -0
  9. package/package.json +4 -6
  10. package/peeky.config.ts +21 -0
  11. package/src/components/HstWrapper.vue +1 -1
  12. package/src/components/checkbox/HstCheckbox.vue +3 -1
  13. package/src/components/radio/HstRadio.story.vue +47 -0
  14. package/src/components/radio/HstRadio.vue +107 -0
  15. package/src/components/select/CustomSelect.vue +3 -7
  16. package/src/components/select/HstSelect.vue +4 -8
  17. package/src/components/slider/HstSlider.vue +1 -1
  18. package/src/components/text/HstText.vue +1 -1
  19. package/src/components/textarea/HstTextarea.vue +1 -1
  20. package/src/index.ts +15 -11
  21. package/src/types.ts +4 -0
  22. package/tsconfig.json +10 -0
  23. package/vite.config.ts +12 -9
  24. package/.histoire/dist/__sandbox.html +0 -16
  25. package/.histoire/dist/assets/BaseEmpty.c5ebb434.js +0 -11
  26. package/.histoire/dist/assets/HomeView.2d2d0dfe.js +0 -24
  27. package/.histoire/dist/assets/HstCheckbox.story.ccd10161.js +0 -151
  28. package/.histoire/dist/assets/HstColorShades.story.d71deb80.js +0 -540
  29. package/.histoire/dist/assets/HstCopyIcon.ef403c78.js +0 -55
  30. package/.histoire/dist/assets/HstNumber.story.1e0e7b71.js +0 -165
  31. package/.histoire/dist/assets/HstSelect.story.8a2b4741.js +0 -290
  32. package/.histoire/dist/assets/HstSlider.story.4155f6ba.js +0 -153
  33. package/.histoire/dist/assets/HstText.story.43417ceb.js +0 -143
  34. package/.histoire/dist/assets/HstTextarea.story.3e39b89e.js +0 -111
  35. package/.histoire/dist/assets/HstTokenGrid.story.e2f237c4.js +0 -156
  36. package/.histoire/dist/assets/HstTokenList.story.bc7b0288.js +0 -184
  37. package/.histoire/dist/assets/HstWrapper.fee42109.js +0 -61
  38. package/.histoire/dist/assets/SearchPane.37a81ba7.js +0 -426
  39. package/.histoire/dist/assets/StoryView.2c1f1961.js +0 -2262
  40. package/.histoire/dist/assets/bundle-main.c70a2b14.js +0 -1156
  41. package/.histoire/dist/assets/bundle-sandbox.f56c0808.js +0 -84
  42. package/.histoire/dist/assets/const.36730b48.js +0 -717
  43. package/.histoire/dist/assets/global-components.d165b38c.js +0 -5806
  44. package/.histoire/dist/assets/search-docs-data.2e7ad186.js +0 -6
  45. package/.histoire/dist/assets/style.dc851298.css +0 -2574
  46. package/.histoire/dist/assets/vendor.31c91490.js +0 -28973
  47. package/.histoire/dist/histoire.svg +0 -51
  48. package/.histoire/dist/index.html +0 -16
  49. package/histoire-dist/__sandbox.html +0 -15
  50. package/histoire-dist/assets/BaseEmpty.a84c14c8.js +0 -1
  51. package/histoire-dist/assets/HomeView.f524bd4b.js +0 -1
  52. package/histoire-dist/assets/HstCheckbox.story.9f622545.js +0 -1
  53. package/histoire-dist/assets/HstInput.story.945401ce.js +0 -1
  54. package/histoire-dist/assets/SearchModal.76c035f2.js +0 -1
  55. package/histoire-dist/assets/StoryView.e4c41518.js +0 -15
  56. package/histoire-dist/assets/global-components.84d0ab22.js +0 -1
  57. package/histoire-dist/assets/histoire-text-dark.a529813a.svg +0 -89
  58. package/histoire-dist/assets/histoire-text.1d4474b5.svg +0 -89
  59. package/histoire-dist/assets/histoire.8af7bd1f.svg +0 -51
  60. package/histoire-dist/assets/index.58f51dd0.js +0 -1
  61. package/histoire-dist/assets/preview-settings.a634d101.js +0 -1
  62. package/histoire-dist/assets/sandbox.2c60450a.js +0 -1
  63. package/histoire-dist/assets/style.7657d2ac.css +0 -1
  64. package/histoire-dist/assets/vendor.70a554f6.js +0 -9
  65. package/histoire-dist/index.html +0 -15
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { HstControlOption } from '../../types';
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ title?: string;
4
+ modelValue: string;
5
+ options: HstControlOption[];
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: string) => void;
8
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ title?: string;
10
+ modelValue: string;
11
+ options: HstControlOption[];
12
+ }>>> & {
13
+ "onUpdate:modelValue"?: (value: string) => any;
14
+ }, {}>;
15
+ export default _default;
16
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
18
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
19
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
+ } : {
21
+ type: import('vue').PropType<T[K]>;
22
+ required: true;
23
+ };
24
+ };
@@ -1,15 +1,12 @@
1
- export interface SelectOption {
2
- label: string;
3
- value: string;
4
- }
1
+ import { HstControlOption } from '../../types';
5
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
6
3
  modelValue: string;
7
- options: Record<string, string> | string[] | SelectOption[];
4
+ options: Record<string, string> | string[] | HstControlOption[];
8
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
6
  "update:modelValue": (value: string) => void;
10
7
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
8
  modelValue: string;
12
- options: Record<string, string> | string[] | SelectOption[];
9
+ options: Record<string, string> | string[] | HstControlOption[];
13
10
  }>>> & {
14
11
  "onUpdate:modelValue"?: (value: string) => any;
15
12
  }, {}>;
@@ -1,14 +1,14 @@
1
- import { SelectOption } from './CustomSelect.vue';
1
+ import { HstControlOption } from '../../types';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
3
  title?: string;
4
4
  modelValue: string;
5
- options: Record<string, string> | string[] | SelectOption[];
5
+ options: Record<string, string> | string[] | HstControlOption[];
6
6
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  "update:modelValue": (value: string) => void;
8
8
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
9
  title?: string;
10
10
  modelValue: string;
11
- options: Record<string, string> | string[] | SelectOption[];
11
+ options: Record<string, string> | string[] | HstControlOption[];
12
12
  }>>> & {
13
13
  "onUpdate:modelValue"?: (value: string) => any;
14
14
  }, {}>;
@@ -22,4 +22,3 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
22
22
  required: true;
23
23
  };
24
24
  };
25
- export type { SelectOption as HstSelectOption } from './CustomSelect.vue';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { App } from 'vue';
2
1
  export declare const HstCheckbox: import("vue").DefineComponent<{
3
2
  modelValue: {
4
3
  type: import("vue").PropType<boolean>;
@@ -120,6 +119,35 @@ export declare const HstTextarea: import("vue").DefineComponent<{
120
119
  }>> & {
121
120
  "onUpdate:modelValue"?: (newValue: string) => any;
122
121
  }, {}>;
122
+ export declare const HstSelect: import("vue").DefineComponent<{
123
+ title: {
124
+ type: import("vue").PropType<string>;
125
+ };
126
+ modelValue: {
127
+ type: import("vue").PropType<string>;
128
+ required: true;
129
+ };
130
+ options: {
131
+ type: import("vue").PropType<string[] | Record<string, string> | import("./types").HstControlOption[]>;
132
+ required: true;
133
+ };
134
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
135
+ "update:modelValue": (value: string) => void;
136
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
137
+ title: {
138
+ type: import("vue").PropType<string>;
139
+ };
140
+ modelValue: {
141
+ type: import("vue").PropType<string>;
142
+ required: true;
143
+ };
144
+ options: {
145
+ type: import("vue").PropType<string[] | Record<string, string> | import("./types").HstControlOption[]>;
146
+ required: true;
147
+ };
148
+ }>> & {
149
+ "onUpdate:modelValue"?: (value: string) => any;
150
+ }, {}>;
123
151
  export declare const HstColorShades: import("vue").DefineComponent<{
124
152
  shades: {
125
153
  type: import("vue").PropType<Record<string, string>>;
@@ -205,4 +233,298 @@ export declare const HstCopyIcon: import("vue").DefineComponent<{
205
233
  required: true;
206
234
  };
207
235
  }>>, {}>;
208
- export declare function registerVueComponents(app: App): void;
236
+ export declare const HstRadio: import("vue").DefineComponent<{
237
+ title: {
238
+ type: import("vue").PropType<string>;
239
+ };
240
+ modelValue: {
241
+ type: import("vue").PropType<string>;
242
+ required: true;
243
+ };
244
+ options: {
245
+ type: import("vue").PropType<import("./types").HstControlOption[]>;
246
+ required: true;
247
+ };
248
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
249
+ "update:modelValue": (value: string) => void;
250
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
251
+ title: {
252
+ type: import("vue").PropType<string>;
253
+ };
254
+ modelValue: {
255
+ type: import("vue").PropType<string>;
256
+ required: true;
257
+ };
258
+ options: {
259
+ type: import("vue").PropType<import("./types").HstControlOption[]>;
260
+ required: true;
261
+ };
262
+ }>> & {
263
+ "onUpdate:modelValue"?: (value: string) => any;
264
+ }, {}>;
265
+ export declare const components: {
266
+ HstCheckbox: import("vue").DefineComponent<{
267
+ modelValue: {
268
+ type: import("vue").PropType<boolean>;
269
+ required: true;
270
+ };
271
+ title: {
272
+ type: import("vue").PropType<string>;
273
+ };
274
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
275
+ 'update:modelValue': (newValue: boolean) => true;
276
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
277
+ modelValue: {
278
+ type: import("vue").PropType<boolean>;
279
+ required: true;
280
+ };
281
+ title: {
282
+ type: import("vue").PropType<string>;
283
+ };
284
+ }>> & {
285
+ "onUpdate:modelValue"?: (newValue: boolean) => any;
286
+ }, {}>;
287
+ HstText: import("vue").DefineComponent<{
288
+ title: {
289
+ type: import("vue").PropType<string>;
290
+ };
291
+ modelValue: {
292
+ type: import("vue").PropType<string>;
293
+ required: true;
294
+ };
295
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
296
+ 'update:modelValue': (newValue: string) => true;
297
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
298
+ title: {
299
+ type: import("vue").PropType<string>;
300
+ };
301
+ modelValue: {
302
+ type: import("vue").PropType<string>;
303
+ required: true;
304
+ };
305
+ }>> & {
306
+ "onUpdate:modelValue"?: (newValue: string) => any;
307
+ }, {}>;
308
+ HstNumber: import("vue").DefineComponent<{
309
+ title: {
310
+ type: import("vue").PropType<string>;
311
+ };
312
+ modelValue: {
313
+ type: import("vue").PropType<number>;
314
+ required: true;
315
+ };
316
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
317
+ 'update:modelValue': (newValue: number) => true;
318
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
319
+ title: {
320
+ type: import("vue").PropType<string>;
321
+ };
322
+ modelValue: {
323
+ type: import("vue").PropType<number>;
324
+ required: true;
325
+ };
326
+ }>> & {
327
+ "onUpdate:modelValue"?: (newValue: number) => any;
328
+ }, {}>;
329
+ HstSlider: import("vue").DefineComponent<{
330
+ title: {
331
+ type: import("vue").PropType<string>;
332
+ };
333
+ modelValue: {
334
+ type: import("vue").PropType<number>;
335
+ required: true;
336
+ };
337
+ min: {
338
+ type: import("vue").PropType<number>;
339
+ required: true;
340
+ };
341
+ max: {
342
+ type: import("vue").PropType<number>;
343
+ required: true;
344
+ };
345
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
346
+ 'update:modelValue': (newValue: number) => true;
347
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
348
+ title: {
349
+ type: import("vue").PropType<string>;
350
+ };
351
+ modelValue: {
352
+ type: import("vue").PropType<number>;
353
+ required: true;
354
+ };
355
+ min: {
356
+ type: import("vue").PropType<number>;
357
+ required: true;
358
+ };
359
+ max: {
360
+ type: import("vue").PropType<number>;
361
+ required: true;
362
+ };
363
+ }>> & {
364
+ "onUpdate:modelValue"?: (newValue: number) => any;
365
+ }, {}>;
366
+ HstTextarea: import("vue").DefineComponent<{
367
+ title: {
368
+ type: import("vue").PropType<string>;
369
+ };
370
+ modelValue: {
371
+ type: import("vue").PropType<string>;
372
+ required: true;
373
+ };
374
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
375
+ 'update:modelValue': (newValue: string) => true;
376
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
377
+ title: {
378
+ type: import("vue").PropType<string>;
379
+ };
380
+ modelValue: {
381
+ type: import("vue").PropType<string>;
382
+ required: true;
383
+ };
384
+ }>> & {
385
+ "onUpdate:modelValue"?: (newValue: string) => any;
386
+ }, {}>;
387
+ HstSelect: import("vue").DefineComponent<{
388
+ title: {
389
+ type: import("vue").PropType<string>;
390
+ };
391
+ modelValue: {
392
+ type: import("vue").PropType<string>;
393
+ required: true;
394
+ };
395
+ options: {
396
+ type: import("vue").PropType<string[] | Record<string, string> | import("./types").HstControlOption[]>;
397
+ required: true;
398
+ };
399
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
400
+ "update:modelValue": (value: string) => void;
401
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
402
+ title: {
403
+ type: import("vue").PropType<string>;
404
+ };
405
+ modelValue: {
406
+ type: import("vue").PropType<string>;
407
+ required: true;
408
+ };
409
+ options: {
410
+ type: import("vue").PropType<string[] | Record<string, string> | import("./types").HstControlOption[]>;
411
+ required: true;
412
+ };
413
+ }>> & {
414
+ "onUpdate:modelValue"?: (value: string) => any;
415
+ }, {}>;
416
+ HstColorShades: import("vue").DefineComponent<{
417
+ shades: {
418
+ type: import("vue").PropType<Record<string, string>>;
419
+ required: true;
420
+ };
421
+ getName: {
422
+ type: import("vue").PropType<(key: string, color: string) => string>;
423
+ };
424
+ search: {
425
+ type: import("vue").PropType<string>;
426
+ };
427
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
428
+ shades: {
429
+ type: import("vue").PropType<Record<string, string>>;
430
+ required: true;
431
+ };
432
+ getName: {
433
+ type: import("vue").PropType<(key: string, color: string) => string>;
434
+ };
435
+ search: {
436
+ type: import("vue").PropType<string>;
437
+ };
438
+ }>>, {}>;
439
+ HstTokenList: import("vue").DefineComponent<{
440
+ tokens: {
441
+ type: import("vue").PropType<Record<string, string | number | any[] | Record<string, any>>>;
442
+ required: true;
443
+ };
444
+ getName: {
445
+ type: import("vue").PropType<(key: string, value: string | number | any[] | Record<string, any>) => string>;
446
+ };
447
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
448
+ tokens: {
449
+ type: import("vue").PropType<Record<string, string | number | any[] | Record<string, any>>>;
450
+ required: true;
451
+ };
452
+ getName: {
453
+ type: import("vue").PropType<(key: string, value: string | number | any[] | Record<string, any>) => string>;
454
+ };
455
+ }>>, {}>;
456
+ HstTokenGrid: import("vue").DefineComponent<{
457
+ getName: {
458
+ type: import("vue").PropType<(key: string, value: string | number | any[] | Record<string, any>) => string>;
459
+ } & {
460
+ default: any;
461
+ };
462
+ colSize: {
463
+ type: import("vue").PropType<number>;
464
+ } & {
465
+ default: number;
466
+ };
467
+ tokens: {
468
+ type: import("vue").PropType<Record<string, string | number | any[] | Record<string, any>>>;
469
+ required: true;
470
+ };
471
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
472
+ getName: {
473
+ type: import("vue").PropType<(key: string, value: string | number | any[] | Record<string, any>) => string>;
474
+ } & {
475
+ default: any;
476
+ };
477
+ colSize: {
478
+ type: import("vue").PropType<number>;
479
+ } & {
480
+ default: number;
481
+ };
482
+ tokens: {
483
+ type: import("vue").PropType<Record<string, string | number | any[] | Record<string, any>>>;
484
+ required: true;
485
+ };
486
+ }>>, {
487
+ getName: (key: string, value: string | number | any[] | Record<string, any>) => string;
488
+ colSize: number;
489
+ }>;
490
+ HstCopyIcon: import("vue").DefineComponent<{
491
+ content: {
492
+ type: import("vue").PropType<string>;
493
+ required: true;
494
+ };
495
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
496
+ content: {
497
+ type: import("vue").PropType<string>;
498
+ required: true;
499
+ };
500
+ }>>, {}>;
501
+ HstRadio: import("vue").DefineComponent<{
502
+ title: {
503
+ type: import("vue").PropType<string>;
504
+ };
505
+ modelValue: {
506
+ type: import("vue").PropType<string>;
507
+ required: true;
508
+ };
509
+ options: {
510
+ type: import("vue").PropType<import("./types").HstControlOption[]>;
511
+ required: true;
512
+ };
513
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
514
+ "update:modelValue": (value: string) => void;
515
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
516
+ title: {
517
+ type: import("vue").PropType<string>;
518
+ };
519
+ modelValue: {
520
+ type: import("vue").PropType<string>;
521
+ required: true;
522
+ };
523
+ options: {
524
+ type: import("vue").PropType<import("./types").HstControlOption[]>;
525
+ required: true;
526
+ };
527
+ }>> & {
528
+ "onUpdate:modelValue"?: (value: string) => any;
529
+ }, {}>;
530
+ };