@warp-ds/elements 2.2.0 → 2.3.0-next.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 (55) hide show
  1. package/dist/custom-elements.json +693 -0
  2. package/dist/index.d.ts +185 -0
  3. package/dist/packages/pagination/index.d.ts +32 -0
  4. package/dist/packages/pagination/index.js +2500 -0
  5. package/dist/packages/pagination/index.js.map +7 -0
  6. package/dist/packages/pagination/locales/da/messages.d.mts +1 -0
  7. package/dist/packages/pagination/locales/da/messages.mjs +1 -0
  8. package/dist/packages/pagination/locales/en/messages.d.mts +1 -0
  9. package/dist/packages/pagination/locales/en/messages.mjs +1 -0
  10. package/dist/packages/pagination/locales/fi/messages.d.mts +1 -0
  11. package/dist/packages/pagination/locales/fi/messages.mjs +1 -0
  12. package/dist/packages/pagination/locales/nb/messages.d.mts +1 -0
  13. package/dist/packages/pagination/locales/nb/messages.mjs +1 -0
  14. package/dist/packages/pagination/locales/sv/messages.d.mts +1 -0
  15. package/dist/packages/pagination/locales/sv/messages.mjs +1 -0
  16. package/dist/packages/pagination/pagination.react.stories.d.ts +21 -0
  17. package/dist/packages/pagination/pagination.react.stories.js +45 -0
  18. package/dist/packages/pagination/pagination.stories.d.ts +14 -0
  19. package/dist/packages/pagination/pagination.stories.js +56 -0
  20. package/dist/packages/pagination/pagination.test.d.ts +1 -0
  21. package/dist/packages/pagination/pagination.test.js +76 -0
  22. package/dist/packages/pagination/react.d.ts +5 -0
  23. package/dist/packages/pagination/react.js +15 -0
  24. package/dist/packages/pagination/styles.d.ts +1 -0
  25. package/dist/packages/pagination/styles.js +2 -0
  26. package/dist/packages/slider/Slider.d.ts +2 -0
  27. package/dist/packages/slider/Slider.js +8 -0
  28. package/dist/packages/slider/SliderThumb.d.ts +2 -0
  29. package/dist/packages/slider/SliderThumb.js +8 -0
  30. package/dist/packages/slider/index.d.ts +2 -0
  31. package/dist/packages/slider/index.js +2 -0
  32. package/dist/packages/slider/oddbird-css-anchor-positioning.d.ts +2 -0
  33. package/dist/packages/slider/oddbird-css-anchor-positioning.js +3 -0
  34. package/dist/packages/slider/react.d.ts +8 -0
  35. package/dist/packages/slider/react.js +20 -0
  36. package/dist/packages/slider/slider-thumb.d.ts +57 -0
  37. package/dist/packages/slider/slider-thumb.js +2705 -0
  38. package/dist/packages/slider/slider-thumb.js.map +7 -0
  39. package/dist/packages/slider/slider.d.ts +46 -0
  40. package/dist/packages/slider/slider.js +2587 -0
  41. package/dist/packages/slider/slider.js.map +7 -0
  42. package/dist/packages/slider/slider.react.stories.d.ts +18 -0
  43. package/dist/packages/slider/slider.react.stories.js +118 -0
  44. package/dist/packages/slider/slider.stories.d.ts +18 -0
  45. package/dist/packages/slider/slider.stories.js +197 -0
  46. package/dist/packages/slider/slider.test.d.ts +4 -0
  47. package/dist/packages/slider/slider.test.js +83 -0
  48. package/dist/packages/slider/styles/w-slider-thumb.styles.d.ts +1 -0
  49. package/dist/packages/slider/styles/w-slider-thumb.styles.js +167 -0
  50. package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
  51. package/dist/packages/slider/styles/w-slider.styles.js +134 -0
  52. package/dist/packages/slider/styles.d.ts +1 -0
  53. package/dist/packages/slider/styles.js +2 -0
  54. package/dist/web-types.json +198 -1
  55. package/package.json +3 -1
package/dist/index.d.ts CHANGED
@@ -15,6 +15,9 @@ import type { ModalFooter } from "./packages/modal/modal-footer.ts";
15
15
  import type { ModalHeader } from "./packages/modal/modal-header.ts";
16
16
  import type { ModalMain } from "./packages/modal/modal-main.ts";
17
17
  import type { WarpToastContainer } from "./packages/toast/toast-container.ts";
18
+ import type { WarpPagination } from "./packages/pagination/index.ts";
19
+ import type { WarpSliderThumb } from "./packages/slider/slider-thumb.ts";
20
+ import type { WarpSlider } from "./packages/slider/slider.ts";
18
21
 
19
22
  /**
20
23
  * This type can be used to create scoped tags for your components.
@@ -467,6 +470,96 @@ export type ModalMainProps = {
467
470
  export type WarpToastContainerProps = {
468
471
 
469
472
 
473
+ }
474
+
475
+
476
+ export type WarpPaginationProps = {
477
+ /** */
478
+ "base-url"?: WarpPagination['baseUrl'];
479
+ /** */
480
+ "baseUrl"?: WarpPagination['baseUrl'];
481
+ /** */
482
+ "pages"?: WarpPagination['pages'];
483
+ /** */
484
+ "current-page"?: WarpPagination['currentPageNumber'];
485
+ /** */
486
+ "currentPageNumber"?: WarpPagination['currentPageNumber'];
487
+ /** */
488
+ "visible-pages"?: WarpPagination['visiblePages'];
489
+ /** */
490
+ "visiblePages"?: WarpPagination['visiblePages'];
491
+
492
+ /** Triggered when a link button in the pagination is clicked. Contains the page number in `string` form. */
493
+ "onpage-click"?: (e: CustomEvent<CustomEvent>) => void;
494
+ }
495
+
496
+
497
+ export type WarpSliderThumbProps = {
498
+ /** */
499
+ "aria-label"?: WarpSliderThumb['ariaLabel'];
500
+ /** */
501
+ "ariaLabel"?: WarpSliderThumb['ariaLabel'];
502
+ /** */
503
+ "aria-description"?: WarpSliderThumb['ariaDescription'];
504
+ /** */
505
+ "ariaDescription"?: WarpSliderThumb['ariaDescription'];
506
+ /** */
507
+ "label"?: WarpSliderThumb['label'];
508
+ /** */
509
+ "name"?: WarpSliderThumb['name'];
510
+ /** */
511
+ "value"?: WarpSliderThumb['value'];
512
+ /** */
513
+ "disabled"?: WarpSliderThumb['disabled'];
514
+ /** Set by `<w-slider>` */
515
+ "markers"?: WarpSliderThumb['markers'];
516
+ /** Set by `<w-slider>` */
517
+ "required"?: WarpSliderThumb['required'];
518
+ /** Set by `<w-slider>` */
519
+ "step"?: WarpSliderThumb['step'];
520
+ /** Set by `<w-slider>` */
521
+ "min"?: WarpSliderThumb['min'];
522
+ /** Set by `<w-slider>` */
523
+ "max"?: WarpSliderThumb['max'];
524
+ /** Set by `<w-slider>` */
525
+ "suffix"?: WarpSliderThumb['suffix'];
526
+ /** JS hook to help you format the numeric value how you want. */
527
+ "formatter"?: WarpSliderThumb['formatter'];
528
+ /** */
529
+ "range"?: WarpSliderThumb['range'];
530
+ /** */
531
+ "textfield"?: WarpSliderThumb['textfield'];
532
+
533
+ /** */
534
+ "onslidervalidity"?: (e: CustomEvent<CustomEvent>) => void;
535
+ }
536
+
537
+
538
+ export type WarpSliderProps = {
539
+ /** The slider fieldset label. Required for proper accessibility.
540
+
541
+ If you need to display HTML, use the `label` slot instead. */
542
+ "label"?: WarpSlider['label'];
543
+ /** */
544
+ "disabled"?: WarpSlider['disabled'];
545
+ /** */
546
+ "invalid"?: WarpSlider['invalid'];
547
+ /** Ensures a child slider thumb has a value before allowing the containing form to submit. */
548
+ "required"?: WarpSlider['required'];
549
+ /** */
550
+ "min"?: WarpSlider['min'];
551
+ /** */
552
+ "max"?: WarpSlider['max'];
553
+ /** Pass a value similar to step to create visual markers at that interval */
554
+ "markers"?: WarpSlider['markers'];
555
+ /** */
556
+ "step"?: WarpSlider['step'];
557
+ /** Suffix used in text input fields and for the min and max values of the slider. */
558
+ "suffix"?: WarpSlider['suffix'];
559
+ /** Function to format the to- and from labels and value in the slider thumb tooltip. */
560
+ "formatter"?: WarpSlider['formatter'];
561
+
562
+
470
563
  }
471
564
 
472
565
  export type CustomElements = {
@@ -885,6 +978,98 @@ export type WarpToastContainerProps = {
885
978
  * - `del(id: string | number) => Promise<boolean>`: undefined
886
979
  */
887
980
  "w-toast-container": Partial<WarpToastContainerProps & BaseProps<WarpToastContainer> & BaseEvents>;
981
+
982
+
983
+ /**
984
+ * Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.
985
+ *
986
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)
987
+ *
988
+ * ## Attributes & Properties
989
+ *
990
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
991
+ *
992
+ * - `base-url`/`baseUrl`: undefined
993
+ * - `pages`: undefined
994
+ * - `current-page`/`currentPageNumber`: undefined
995
+ * - `visible-pages`/`visiblePages`: undefined
996
+ *
997
+ * ## Events
998
+ *
999
+ * Events that will be emitted by the component.
1000
+ *
1001
+ * - `page-click`: Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.
1002
+ */
1003
+ "w-pagination": Partial<WarpPaginationProps & BaseProps<WarpPagination> & BaseEvents>;
1004
+
1005
+
1006
+ /**
1007
+ * Component to place inside a `<w-slider>`.
1008
+ *
1009
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
1010
+ *
1011
+ * ## Attributes & Properties
1012
+ *
1013
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
1014
+ *
1015
+ * - `aria-label`/`ariaLabel`: undefined
1016
+ * - `aria-description`/`ariaDescription`: undefined
1017
+ * - `label`: undefined
1018
+ * - `name`: undefined
1019
+ * - `value`: undefined
1020
+ * - `disabled`: undefined
1021
+ * - `markers`: Set by `<w-slider>` (property only)
1022
+ * - `required`: Set by `<w-slider>` (property only)
1023
+ * - `step`: Set by `<w-slider>` (property only)
1024
+ * - `min`: Set by `<w-slider>` (property only)
1025
+ * - `max`: Set by `<w-slider>` (property only)
1026
+ * - `suffix`: Set by `<w-slider>` (property only)
1027
+ * - `formatter`: JS hook to help you format the numeric value how you want. (property only)
1028
+ * - `range`: undefined (property only)
1029
+ * - `textfield`: undefined (property only)
1030
+ *
1031
+ * ## Events
1032
+ *
1033
+ * Events that will be emitted by the component.
1034
+ *
1035
+ * - `slidervalidity`: undefined
1036
+ */
1037
+ "w-slider-thumb": Partial<WarpSliderThumbProps & BaseProps<WarpSliderThumb> & BaseEvents>;
1038
+
1039
+
1040
+ /**
1041
+ * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
1042
+ *
1043
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
1044
+ *
1045
+ * ## Attributes & Properties
1046
+ *
1047
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
1048
+ *
1049
+ * - `label`: The slider fieldset label. Required for proper accessibility.
1050
+ *
1051
+ * If you need to display HTML, use the `label` slot instead.
1052
+ * - `disabled`: undefined
1053
+ * - `invalid`: undefined
1054
+ * - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit.
1055
+ * - `min`: undefined
1056
+ * - `max`: undefined
1057
+ * - `markers`: Pass a value similar to step to create visual markers at that interval
1058
+ * - `step`: undefined
1059
+ * - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
1060
+ * - `formatter`: Function to format the to- and from labels and value in the slider thumb tooltip. (property only)
1061
+ *
1062
+ * ## Slots
1063
+ *
1064
+ * Areas where markup can be added to the component.
1065
+ *
1066
+ * - `(default)`: For single sliders place a `<w-slider-thumb>` in the default slot.
1067
+ * - `label`: Label for the slider or range slider as a whole.
1068
+ * - `description`: Optional description between the label and slider.
1069
+ * - `from`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
1070
+ * - `to`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
1071
+ */
1072
+ "w-slider": Partial<WarpSliderProps & BaseProps<WarpSlider> & BaseEvents>;
888
1073
  }
889
1074
 
890
1075
  export type CustomCssProperties = {
@@ -0,0 +1,32 @@
1
+ import { LitElement } from 'lit';
2
+ import '@warp-ds/icons/elements/chevron-double-left-16';
3
+ import '@warp-ds/icons/elements/chevron-left-16';
4
+ import '@warp-ds/icons/elements/chevron-right-16';
5
+ /**
6
+ * Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.
7
+ *
8
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)
9
+ *
10
+ * @fires {CustomEvent} page-click - Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.
11
+ */
12
+ declare class WarpPagination extends LitElement {
13
+ #private;
14
+ baseUrl: string;
15
+ pages: number;
16
+ currentPageNumber: number;
17
+ visiblePages: number;
18
+ static styles: import("lit").CSSResult[];
19
+ constructor();
20
+ /** @internal */
21
+ get shouldShowShowFirstPageButton(): boolean;
22
+ /** @internal */
23
+ get shouldShowPreviousPageButton(): boolean;
24
+ /** @internal */
25
+ get shouldShowNextPageButton(): boolean;
26
+ /** @internal */
27
+ get currentPageIndex(): number;
28
+ /** @internal */
29
+ get visiblePageNumbers(): number[];
30
+ render(): import("lit").TemplateResult<1>;
31
+ }
32
+ export { WarpPagination };