@warp-ds/elements 2.10.0-next.22 → 2.10.0-next.24

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 (33) hide show
  1. package/dist/custom-elements.json +100 -18
  2. package/dist/docs/modal/api.md +3 -1
  3. package/dist/docs/modal/modal.md +82 -9
  4. package/dist/docs/modal/styling.md +75 -0
  5. package/dist/docs/modal/usage.md +4 -8
  6. package/dist/index.d.ts +134 -4
  7. package/dist/packages/modal/modal.d.ts +17 -2
  8. package/dist/packages/modal/modal.js +176 -129
  9. package/dist/packages/modal/modal.js.map +4 -4
  10. package/dist/packages/modal/modal.stories.d.ts +5 -4
  11. package/dist/packages/modal/modal.stories.js +41 -38
  12. package/dist/packages/modal/styles.d.ts +1 -0
  13. package/dist/packages/modal/styles.js +171 -0
  14. package/dist/packages/modal-footer/modal-footer.d.ts +5 -1
  15. package/dist/packages/modal-footer/modal-footer.js +25 -22
  16. package/dist/packages/modal-footer/modal-footer.js.map +4 -4
  17. package/dist/packages/modal-footer/styles.d.ts +1 -0
  18. package/dist/packages/modal-footer/styles.js +22 -0
  19. package/dist/packages/modal-header/modal-header.d.ts +12 -5
  20. package/dist/packages/modal-header/modal-header.js +149 -141
  21. package/dist/packages/modal-header/modal-header.js.map +4 -4
  22. package/dist/packages/modal-header/styles.d.ts +1 -0
  23. package/dist/packages/modal-header/styles.js +96 -0
  24. package/dist/packages/textarea/react.d.ts +1 -1
  25. package/dist/packages/textarea/textarea.d.ts +2 -4
  26. package/dist/packages/textarea/textarea.js.map +2 -2
  27. package/dist/packages/textarea/textarea.react.stories.d.ts +19 -2
  28. package/dist/packages/textarea/textarea.react.stories.js +17 -0
  29. package/dist/packages/textfield/textfield.react.stories.d.ts +30 -0
  30. package/dist/packages/textfield/textfield.react.stories.js +32 -0
  31. package/dist/web-types.json +50 -4
  32. package/eik/index.js +16 -16
  33. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,96 @@
1
+ import { css } from "lit";
2
+ export const styles = css `
3
+ :host {
4
+ --_font-size: var(--w-c-modal-header-font-size, var(--w-font-size-l));
5
+ --_line-height: var(--w-c-modal-header-line-height, var(--w-line-height-l));
6
+ --_title-margin: 0 0 6px 0;
7
+ --_title-padding: 22px 0 0 16px;
8
+ --_close-button-top: 14px;
9
+ --_close-button-right: 0px;
10
+ --_header-margin-bottom: var(--w-c-modal-header-margin-bottom, 8px);
11
+ }
12
+
13
+ @media (min-width: 480px) {
14
+ :host {
15
+ --_title-padding: 22px 0 0 32px;
16
+ --_close-button-right: 14px;
17
+ }
18
+ }
19
+
20
+ [part="header"] {
21
+ display: grid;
22
+ grid-template:
23
+ "top top top"
24
+ "title title title";
25
+ margin-bottom: var(--_header-margin-bottom);
26
+ }
27
+
28
+ [part="header"][show-back]:not([show-close]) {
29
+ grid-template:
30
+ "top top top"
31
+ "back title title";
32
+ }
33
+
34
+ [part="header"][show-close]:not([show-back]) {
35
+ grid-template:
36
+ "top top top"
37
+ "title title close";
38
+ }
39
+
40
+ [part="header"][show-back][show-close] {
41
+ grid-template:
42
+ "top top top"
43
+ "back title close" / 44px 1fr 44px;
44
+ }
45
+
46
+ [part="top"]::slotted(*) {
47
+ grid-area: top;
48
+ }
49
+
50
+ [part="title"] {
51
+ grid-area: title;
52
+
53
+ margin: var(--_title-margin);
54
+ padding: var(--_title-padding);
55
+
56
+ /* t3 */
57
+ font-weight: 700;
58
+ font-size: var(--_font-size);
59
+ line-height: var(--_line-height);
60
+ }
61
+
62
+ [part="header"][show-back] [part="title"] {
63
+ text-align: center;
64
+ }
65
+
66
+ [part="back"] {
67
+ grid-area: back;
68
+
69
+ margin-block-end: -2px; /* align the touch target with the close button which is _slightly_ lower than the title */
70
+ padding-block-start: 14px; /* same vertical position as the close button */
71
+ padding-inline-start: 18px; /* 32px (left padding of title) - 14px (left padding of button) so icon aligns with text */
72
+ }
73
+
74
+ [part="header"][show-back] [part="title"] {
75
+ padding-inline-start: 0;
76
+ }
77
+
78
+ [part="close"] {
79
+ grid-area: close;
80
+
81
+ position: absolute; /* so we can place it on top of the [part="top"] image */
82
+ top: var(--_close-button-top);
83
+ right: var(--_close-button-right);
84
+ }
85
+
86
+ [part="header"][show-top] [part="close"] {
87
+ /* Invert the button colors on images */
88
+ --w-c-button-color: var(--w-s-color-icon-inverted-static);
89
+ --w-c-button-color-hover: var(--w-s-color-icon-inverted-static);
90
+ --w-c-button-color-active: var(--w-s-color-icon-inverted-static);
91
+
92
+ --w-c-button-bg: rgba(var(--w-rgb-black), 0.7);
93
+ --w-c-button-bg-hover: rgba(var(--w-rgb-black), 0.85);
94
+ --w-c-button-bg-active: rgba(var(--w-rgb-black), 1);
95
+ }
96
+ `;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { WarpTextarea } from "./textarea.js";
3
- export declare const Textarea: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "optional" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "minHeight" | "setCustomValidity" | "maxRows" | "minRows" | "maxHeight" | "_textareaStyles"> & {
3
+ export declare const Textarea: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<WarpTextarea>, "value" | "form" | "label" | "name" | "disabled" | "invalid" | "helpText" | "optional" | "placeholder" | "readOnly" | "readonly" | "required" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "updated" | "firstUpdated" | "resetFormControl" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "render" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput" | "reportValidity" | "setCustomValidity" | "maxRows" | "minRows" | "_textareaStyles"> & {
4
4
  onBlur?: ((e: Event) => void) | undefined;
5
5
  onblur?: ((e: Event) => void) | undefined;
6
6
  onChange?: ((e: Event) => void) | undefined;
@@ -87,10 +87,8 @@ declare class WarpTextarea extends WarpTextarea_base {
87
87
  * Show an icon behind the label indicating the field is optional
88
88
  */
89
89
  optional: boolean;
90
- /** @internal */
91
- minHeight: number;
92
- /** @internal */
93
- maxHeight: number;
90
+ private minHeight;
91
+ private maxHeight;
94
92
  private _textarea;
95
93
  constructor();
96
94
  updated(changedProperties: PropertyValues<this>): void;