@warp-ds/elements 2.9.1-next.3 → 2.9.1-next.4

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 (91) hide show
  1. package/dist/custom-elements.json +83 -239
  2. package/dist/docs/affix/affix.md +9 -10
  3. package/dist/docs/affix/api.md +9 -10
  4. package/dist/docs/alert/alert.md +4 -2
  5. package/dist/docs/alert/api.md +4 -2
  6. package/dist/docs/attention/api.md +16 -14
  7. package/dist/docs/attention/attention.md +16 -14
  8. package/dist/docs/badge/api.md +5 -6
  9. package/dist/docs/badge/badge.md +5 -6
  10. package/dist/docs/box/api.md +3 -4
  11. package/dist/docs/box/box.md +3 -4
  12. package/dist/docs/breadcrumbs/accessibility.md +46 -0
  13. package/dist/docs/breadcrumbs/api.md +8 -8
  14. package/dist/docs/breadcrumbs/breadcrumbs.md +127 -9
  15. package/dist/docs/breadcrumbs/examples.md +35 -0
  16. package/dist/docs/breadcrumbs/usage.md +36 -0
  17. package/dist/docs/button/api.md +15 -13
  18. package/dist/docs/button/button.md +15 -13
  19. package/dist/docs/card/api.md +5 -6
  20. package/dist/docs/card/card.md +5 -6
  21. package/dist/docs/combobox/api.md +18 -19
  22. package/dist/docs/combobox/combobox.md +18 -19
  23. package/dist/docs/datepicker/api.md +38 -39
  24. package/dist/docs/datepicker/datepicker.md +38 -39
  25. package/dist/docs/expandable/api.md +11 -12
  26. package/dist/docs/expandable/expandable.md +11 -12
  27. package/dist/docs/link/api.md +8 -6
  28. package/dist/docs/link/link.md +8 -6
  29. package/dist/docs/page-indicator/api.md +7 -8
  30. package/dist/docs/page-indicator/page-indicator.md +7 -8
  31. package/dist/docs/pagination/api.md +17 -9
  32. package/dist/docs/pagination/pagination.md +17 -9
  33. package/dist/docs/pill/api.md +30 -17
  34. package/dist/docs/pill/pill.md +30 -17
  35. package/dist/docs/select/api.md +17 -9
  36. package/dist/docs/select/select.md +17 -9
  37. package/dist/docs/slider/api.md +37 -116
  38. package/dist/docs/slider/examples.md +331 -0
  39. package/dist/docs/slider/slider.md +378 -118
  40. package/dist/docs/slider/usage.md +10 -0
  41. package/dist/docs/slider-thumb/api.md +26 -55
  42. package/dist/docs/slider-thumb/slider-thumb.md +26 -57
  43. package/dist/docs/step/api.md +3 -4
  44. package/dist/docs/step/step.md +3 -4
  45. package/dist/docs/step-indicator/api.md +3 -4
  46. package/dist/docs/step-indicator/step-indicator.md +3 -4
  47. package/dist/docs/switch/api.md +13 -5
  48. package/dist/docs/switch/switch.md +13 -5
  49. package/dist/docs/tab/api.md +9 -62
  50. package/dist/docs/tab/tab.md +9 -70
  51. package/dist/docs/tab-panel/api.md +7 -11
  52. package/dist/docs/tab-panel/tab-panel.md +7 -19
  53. package/dist/docs/tabs/accessibility.md +11 -0
  54. package/dist/docs/tabs/api.md +10 -18
  55. package/dist/docs/tabs/examples.md +68 -0
  56. package/dist/docs/tabs/tabs.md +97 -20
  57. package/dist/docs/tabs/usage.md +8 -0
  58. package/dist/docs/textarea/api.md +15 -16
  59. package/dist/docs/textarea/textarea.md +15 -16
  60. package/dist/docs/textfield/api.md +14 -15
  61. package/dist/docs/textfield/textfield.md +14 -15
  62. package/dist/index.d.ts +124 -224
  63. package/dist/packages/breadcrumbs/breadcrumbs.d.ts +7 -1
  64. package/dist/packages/breadcrumbs/breadcrumbs.js.map +2 -2
  65. package/dist/packages/pagination/pagination.test.js +38 -0
  66. package/dist/packages/slider/slider.d.ts +34 -45
  67. package/dist/packages/slider/slider.js +1 -1
  68. package/dist/packages/slider/slider.js.map +2 -2
  69. package/dist/packages/slider-thumb/slider-thumb.d.ts +36 -31
  70. package/dist/packages/slider-thumb/slider-thumb.js +1 -1
  71. package/dist/packages/slider-thumb/slider-thumb.js.map +2 -2
  72. package/dist/packages/tab/tab.d.ts +29 -24
  73. package/dist/packages/tab/tab.js +3 -3
  74. package/dist/packages/tab/tab.js.map +2 -2
  75. package/dist/packages/tab-panel/tab-panel.d.ts +9 -8
  76. package/dist/packages/tab-panel/tab-panel.js +3 -3
  77. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  78. package/dist/packages/tabs/index.d.ts +1 -0
  79. package/dist/packages/tabs/index.js +0 -1
  80. package/dist/packages/tabs/react.d.ts +4 -3
  81. package/dist/packages/tabs/tabs.d.ts +9 -3
  82. package/dist/packages/tabs/tabs.js.map +2 -2
  83. package/dist/packages/tabs/tabs.react.stories.d.ts +2 -2
  84. package/dist/web-types.json +201 -93
  85. package/package.json +2 -1
  86. package/dist/docs/tab/accessibility.md +0 -1
  87. package/dist/docs/tab/examples.md +0 -1
  88. package/dist/docs/tab/usage.md +0 -1
  89. package/dist/docs/tab-panel/accessibility.md +0 -1
  90. package/dist/docs/tab-panel/examples.md +0 -1
  91. package/dist/docs/tab-panel/usage.md +0 -1
@@ -5,10 +5,13 @@ declare const WarpSliderThumb_base: import("@open-wc/form-control").Constructor<
5
5
  /**
6
6
  * Component to place inside a `<w-slider>`.
7
7
  *
8
- * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
8
+ * @parent w-slider
9
+ * @event {CustomEvent} slidervalidity - Internal event used by (and stopped by) `w-slider`.
10
+ * @event {CustomEvent} thumbreset - Internal event used by (and stopped by) `w-slider`.
9
11
  */
10
12
  declare class WarpSliderThumb extends WarpSliderThumb_base {
11
13
  #private;
14
+ /** @internal */
12
15
  static shadowRootOptions: {
13
16
  delegatesFocus: boolean;
14
17
  clonable?: boolean;
@@ -19,43 +22,37 @@ declare class WarpSliderThumb extends WarpSliderThumb_base {
19
22
  };
20
23
  static styles: import("lit").CSSResult[];
21
24
  /**
22
- * @summary
23
- * @description
25
+ * Label for the range input.
26
+ *
27
+ * @default `label` from `w-slider`
24
28
  */
25
29
  ariaLabel: string;
26
30
  /**
27
- * @summary
28
- * @description
31
+ * Contextual information for assistive technology, should it be needed
29
32
  */
30
33
  ariaDescription: string;
31
34
  /**
32
- * @summary
33
- * @description
35
+ * The name of this input field in the form. The canonical source of the value is the text field.
34
36
  */
35
37
  name: string;
36
38
  /**
37
- * @summary
38
- * @description
39
+ * The initial value, if any
39
40
  */
40
41
  value: string;
41
- /** @internal Set by `<w-slider>`
42
- * @summary
43
- * @description
42
+ /**
43
+ * @internal Set by `<w-slider>`
44
44
  */
45
45
  disabled: boolean;
46
- /** @internal Set by `<w-slider>`
47
- * @summary
48
- * @description
46
+ /**
47
+ * @internal Set by `<w-slider>`
49
48
  */
50
49
  invalid: boolean;
51
- /** @internal Set by `<w-slider>`
52
- * @summary
53
- * @description
50
+ /**
51
+ * @internal Set by `<w-slider>`
54
52
  */
55
53
  openEnded: boolean;
56
54
  /**
57
- * @summary
58
- * @description
55
+ * Placeholder in empty text fields
59
56
  */
60
57
  placeholder: string;
61
58
  /** @internal Set by `<w-slider>` */
@@ -70,19 +67,16 @@ declare class WarpSliderThumb extends WarpSliderThumb_base {
70
67
  max: string;
71
68
  /** @internal Set by `<w-slider>` */
72
69
  suffix: string;
73
- /** @internal Formatter for the tooltip and input mask values. Set by `<w-slider>`.
74
- * @summary
75
- * @description
70
+ /**
71
+ * @internal Formatter for the tooltip and input mask values. Set by `<w-slider>`.
76
72
  */
77
73
  valueFormatter: (value: string, slot: SliderSlot) => string;
78
- /** @internal Replaces {@link valueFormatter} for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. Set by `<w-slider>`.
79
- * @summary
80
- * @description
74
+ /**
75
+ * @internal Replaces {@link valueFormatter} for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. Set by `<w-slider>`.
81
76
  */
82
77
  tooltipFormatter: (value: string, slot: SliderSlot) => string;
83
- /** @internal Formatter for the min and max labels below the range. Set by `<w-slider>`.
84
- * @summary
85
- * @description
78
+ /**
79
+ * @internal Formatter for the min and max labels below the range. Set by `<w-slider>`.
86
80
  */
87
81
  labelFormatter: (slot: SliderSlot) => string;
88
82
  /** @internal */
@@ -105,11 +99,22 @@ declare class WarpSliderThumb extends WarpSliderThumb_base {
105
99
  anchorPositioningStyleElement: HTMLStyleElement | null;
106
100
  updateFieldAfterValidation(): Promise<void>;
107
101
  connectedCallback(): Promise<void>;
102
+ /**
103
+ * The boundary value for this thumb (min for 'from', max for 'to' or default)
104
+ * @internal
105
+ */
108
106
  get boundaryValue(): string;
109
- /** Value to display in the textfield (shows boundary when focused on empty value) */
107
+ /**
108
+ * Value to display in the textfield (shows boundary when focused on empty value)
109
+ * @internal
110
+ */
110
111
  get textFieldDisplayValue(): string;
111
- /** Value to display in the tooltip */
112
+ /**
113
+ * Value to display in the tooltip
114
+ * @internal
115
+ */
112
116
  get tooltipDisplayValue(): string | number;
117
+ /** @internal */
113
118
  get ariaDescriptionText(): string;
114
119
  updated(changedProperties: PropertyValues<this>): void;
115
120
  render(): import("lit").TemplateResult<1>;
@@ -2770,5 +2770,5 @@ Please compile your catalog first.
2770
2770
  ${this.ariaDescriptionText}
2771
2771
  </span>
2772
2772
  </div>
2773
- `}};T=new WeakMap,d=new WeakSet,B=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},G=function(){this._showTooltip=!1},ce=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},Y=function(e){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:e,slot:this.slot}}))},U=async function(e,t){var E;let a=(E=this.suffix)!=null?E:"",i=Number.parseInt(e);if(this.openEnded&&!t&&this.step&&!(this.slot==="to"&&i>=Number(this.max)-1||this.slot==="from"&&i<=Number(this.min)+1)){let M=1/this.step;i=Math.round(i*M)/M,e=i.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.openEnded&&(i>n||i<s))return m(this,d,Y).call(this,C.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${a}`.trim(),max:`${this.max} ${a}`.trim()}})),{shouldCancel:!0};e===""&&this.required&&m(this,d,Y).call(this,C.t({id:"slider.error.required",message:"This field is required"})),this.value=e;let c=e===this.max||e===this.min,f=!1;if(this.slot){let F=this.parentElement.querySelector('w-slider-thumb[slot="to"]'),M=this.parentElement.querySelector('w-slider-thumb[slot="from"]'),k=F.textfield.value||this.max,y=M.textfield.value||this.min,_=Number.parseInt(k),x=Number.parseInt(y),S=C.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let V=this.openEnded&&_>n?_:Math.min(_,this.openEnded?n-1:n);i>V&&(f=!0,this.openEnded&&c?this.value=String(V):this.value=k,t&&(m(this,d,Y).call(this,S),await this.updateComplete,this.textfield.value=e))}else{let V=this.openEnded&&x<s?x:Math.max(Number.parseInt(y),this.openEnded?s+1:s);i<V&&(f=!0,this.openEnded&&c?this.value=String(V):this.value=y,t&&(m(this,d,Y).call(this,S),await this.updateComplete,this.textfield.value=e))}}return f?{shouldCancel:!0}:(m(this,d,Y).call(this,""),this.range.value=Math.min(Math.max(Number(e),Number(this.min)),Number(this.max)).toString(),this.value=this.openEnded&&!t&&c?"":e,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},he=async function(e){let t=e.currentTarget.tagName==="W-TEXTFIELD";if(e instanceof CustomEvent)return;let a=e.currentTarget.value;return(await m(this,d,U).call(this,a,t)).shouldCancel?(e.preventDefault(),!1):!0},Fe=async function(e){if(e.key==="Enter"&&this.internals.form){this.internals.form.requestSubmit();return}if(!this.openEnded||e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;let t=Number(this.range.value),a=this.step||1,i;e.key==="ArrowLeft"?i=t-a:i=t+a,i=Math.min(Math.max(i,Number(this.min)),Number(this.max)),(await m(this,d,U).call(this,i.toString(),!1)).shouldCancel&&e.preventDefault()},Me=async function(e){if(e.key==="Enter"&&this.internals.form){this.internals.form.requestSubmit();return}if(this.textfield.value)return;e.preventDefault();let t="";this.slot==="from"?e.key==="ArrowUp"?t=String(Number(this.min)+1)||"1":e.key==="ArrowDown"&&(t=String(Number(this.min))||"0"):e.key==="ArrowUp"?t=String(Number(this.max))||"100":e.key==="ArrowDown"&&(t=String(Number(this.max)-1)||"99"),await m(this,d,U).call(this,t,!0)},b.shadowRootOptions={...Ce.shadowRootOptions,delegatesFocus:!0},b.styles=[_e,ke,ze],p([$({attribute:"aria-label"})],b.prototype,"ariaLabel",2),p([$({attribute:"aria-description"})],b.prototype,"ariaDescription",2),p([$({reflect:!0})],b.prototype,"name",2),p([$({reflect:!0})],b.prototype,"value",2),p([$({type:Boolean,reflect:!0})],b.prototype,"disabled",2),p([$({type:Boolean,reflect:!0})],b.prototype,"invalid",2),p([$({attribute:!1,reflect:!1})],b.prototype,"openEnded",2),p([$({reflect:!0})],b.prototype,"placeholder",2),p([N()],b.prototype,"markers",2),p([N()],b.prototype,"required",2),p([N()],b.prototype,"step",2),p([N()],b.prototype,"min",2),p([N()],b.prototype,"max",2),p([N()],b.prototype,"suffix",2),p([$({attribute:!1})],b.prototype,"valueFormatter",2),p([$({attribute:!1})],b.prototype,"tooltipFormatter",2),p([$({attribute:!1})],b.prototype,"labelFormatter",2),p([de('input[type="range"]')],b.prototype,"range",2),p([de(".w-slider-thumb__tooltip-target")],b.prototype,"tooltipTarget",2),p([de("w-textfield")],b.prototype,"textfield",2),p([N()],b.prototype,"_showTooltip",2),p([N()],b.prototype,"_inputHasFocus",2),p([N()],b.prototype,"_hiddenTextfield",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",b);export{b as WarpSliderThumb};
2773
+ `}};T=new WeakMap,d=new WeakSet,B=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},G=function(){this._showTooltip=!1},ce=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},Y=function(e){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:e,slot:this.slot}}))},U=async function(e,t){var E;let a=(E=this.suffix)!=null?E:"",i=Number.parseInt(e);if(this.openEnded&&!t&&this.step&&!(this.slot==="to"&&i>=Number(this.max)-1||this.slot==="from"&&i<=Number(this.min)+1)){let M=1/this.step;i=Math.round(i*M)/M,e=i.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.openEnded&&(i>n||i<s))return m(this,d,Y).call(this,C.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${a}`.trim(),max:`${this.max} ${a}`.trim()}})),{shouldCancel:!0};e===""&&this.required&&m(this,d,Y).call(this,C.t({id:"slider.error.required",message:"This field is required"})),this.value=e;let c=e===this.max||e===this.min,f=!1;if(this.slot){let F=this.parentElement.querySelector('w-slider-thumb[slot="to"]'),M=this.parentElement.querySelector('w-slider-thumb[slot="from"]'),k=F.textfield.value||this.max,y=M.textfield.value||this.min,_=Number.parseInt(k),x=Number.parseInt(y),S=C.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let V=this.openEnded&&_>n?_:Math.min(_,this.openEnded?n-1:n);i>V&&(f=!0,this.openEnded&&c?this.value=String(V):this.value=k,t&&(m(this,d,Y).call(this,S),await this.updateComplete,this.textfield.value=e))}else{let V=this.openEnded&&x<s?x:Math.max(Number.parseInt(y),this.openEnded?s+1:s);i<V&&(f=!0,this.openEnded&&c?this.value=String(V):this.value=y,t&&(m(this,d,Y).call(this,S),await this.updateComplete,this.textfield.value=e))}}return f?{shouldCancel:!0}:(m(this,d,Y).call(this,""),this.range.value=Math.min(Math.max(Number(e),Number(this.min)),Number(this.max)).toString(),this.value=this.openEnded&&!t&&c?"":e,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},he=async function(e){let t=e.currentTarget.tagName==="W-TEXTFIELD";if(e instanceof CustomEvent)return;let a=e.currentTarget.value;return(await m(this,d,U).call(this,a,t)).shouldCancel?(e.preventDefault(),!1):!0},Fe=async function(e){if(e.key==="Enter"&&this.internals.form){this.internals.form.requestSubmit();return}if(!this.openEnded||e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;let t=Number(this.range.value),a=this.step||1,i;e.key==="ArrowLeft"?i=t-a:i=t+a,i=Math.min(Math.max(i,Number(this.min)),Number(this.max)),(await m(this,d,U).call(this,i.toString(),!1)).shouldCancel&&e.preventDefault()},Me=async function(e){if(e.key==="Enter"&&this.internals.form){this.internals.form.requestSubmit();return}if(this.textfield.value)return;let t="";this.slot==="from"?e.key==="ArrowUp"?t=String(Number(this.min)+1)||"1":e.key==="ArrowDown"&&(t=String(Number(this.min))||"0"):e.key==="ArrowUp"?t=String(Number(this.max))||"100":e.key==="ArrowDown"&&(t=String(Number(this.max)-1)||"99"),t&&(e.preventDefault(),await m(this,d,U).call(this,t,!0))},b.shadowRootOptions={...Ce.shadowRootOptions,delegatesFocus:!0},b.styles=[_e,ke,ze],p([$({attribute:"aria-label"})],b.prototype,"ariaLabel",2),p([$({attribute:"aria-description"})],b.prototype,"ariaDescription",2),p([$({reflect:!0})],b.prototype,"name",2),p([$({reflect:!0})],b.prototype,"value",2),p([$({type:Boolean,reflect:!0})],b.prototype,"disabled",2),p([$({type:Boolean,reflect:!0})],b.prototype,"invalid",2),p([$({attribute:!1,reflect:!1})],b.prototype,"openEnded",2),p([$({reflect:!0})],b.prototype,"placeholder",2),p([N()],b.prototype,"markers",2),p([N()],b.prototype,"required",2),p([N()],b.prototype,"step",2),p([N()],b.prototype,"min",2),p([N()],b.prototype,"max",2),p([N()],b.prototype,"suffix",2),p([$({attribute:!1})],b.prototype,"valueFormatter",2),p([$({attribute:!1})],b.prototype,"tooltipFormatter",2),p([$({attribute:!1})],b.prototype,"labelFormatter",2),p([de('input[type="range"]')],b.prototype,"range",2),p([de(".w-slider-thumb__tooltip-target")],b.prototype,"tooltipTarget",2),p([de("w-textfield")],b.prototype,"textfield",2),p([N()],b.prototype,"_showTooltip",2),p([N()],b.prototype,"_inputHasFocus",2),p([N()],b.prototype,"_hiddenTextfield",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",b);export{b as WarpSliderThumb};
2774
2774
  //# sourceMappingURL=slider-thumb.js.map