@warp-ds/elements 2.10.1-next.1 → 2.11.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/dist/custom-elements.json +12 -5
- package/dist/docs/card/api.md +0 -8
- package/dist/docs/card/card.md +56 -11
- package/dist/docs/card/styling.md +51 -0
- package/dist/docs/card/usage.md +4 -2
- package/dist/docs/index.md +1 -1
- package/dist/docs/modal/modal.md +1 -0
- package/dist/docs/modal/styling.md +1 -0
- package/dist/index.d.ts +6 -8
- package/dist/packages/card/card.d.ts +2 -9
- package/dist/packages/card/card.js +151 -20
- package/dist/packages/card/card.js.map +4 -4
- package/dist/packages/card/card.react.stories.d.ts +1 -1
- package/dist/packages/card/card.stories.d.ts +1 -0
- package/dist/packages/card/card.stories.js +44 -1
- package/dist/packages/card/styles.js +132 -2
- package/dist/packages/modal/modal.d.ts +1 -0
- package/dist/packages/modal/modal.js +5 -1
- package/dist/packages/modal/modal.js.map +2 -2
- package/dist/packages/modal/modal.react.stories.d.ts +1 -1
- package/dist/packages/modal/react.d.ts +13 -5
- package/dist/packages/modal/react.js +10 -4
- package/dist/packages/modal/styles.js +5 -1
- package/dist/packages/modal-footer/react.d.ts +2 -1
- package/dist/packages/modal-footer/react.js +11 -5
- package/dist/packages/modal-header/react.js +1 -0
- package/dist/web-types.json +5 -5
- package/eik/index.js +9 -9
- package/package.json +1 -1
|
@@ -4,13 +4,19 @@ import React from "react";
|
|
|
4
4
|
// decouple from CDN by providing a dummy class
|
|
5
5
|
class Component extends LitElement {
|
|
6
6
|
}
|
|
7
|
+
const BaseModalFooter = createComponent({
|
|
8
|
+
tagName: "w-modal-footer",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
react: React,
|
|
11
|
+
});
|
|
7
12
|
/**
|
|
8
13
|
* The footer section of a modal, typically where you place actions.
|
|
9
14
|
*
|
|
10
15
|
* [Warp component reference](https://warp-ds.github.io/docs/components/modal/frameworks/elements)
|
|
11
16
|
*/
|
|
12
|
-
export const ModalFooter =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
+
export const ModalFooter = React.forwardRef(({ ...props }, ref) => React.createElement(BaseModalFooter, {
|
|
18
|
+
slot: "footer",
|
|
19
|
+
...props,
|
|
20
|
+
ref,
|
|
21
|
+
}));
|
|
22
|
+
ModalFooter.displayName = "ModalFooter";
|
|
@@ -19,6 +19,7 @@ const BaseModalHeader = createComponent({
|
|
|
19
19
|
* [Warp component reference](https://warp-ds.github.io/docs/components/modal/frameworks/elements)
|
|
20
20
|
*/
|
|
21
21
|
export const ModalHeader = React.forwardRef(({ noClose, ...props }, ref) => React.createElement(BaseModalHeader, {
|
|
22
|
+
slot: "header",
|
|
22
23
|
...props,
|
|
23
24
|
...(noClose ? { "no-close": true } : {}),
|
|
24
25
|
ref,
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@warp-ds/elements",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.0-next.1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -953,7 +953,7 @@
|
|
|
953
953
|
},
|
|
954
954
|
{
|
|
955
955
|
"name": "w-card",
|
|
956
|
-
"description": "Card is a layout component used for
|
|
956
|
+
"description": "Card is a layout component used for grouping interactive content areas on a page.\n\n[Warp component reference](https://warp-ds.github.io/docs/components/card/frameworks/elements)\n---\n",
|
|
957
957
|
"doc-url": "",
|
|
958
958
|
"attributes": [
|
|
959
959
|
{
|
|
@@ -989,8 +989,7 @@
|
|
|
989
989
|
"name": "clickable",
|
|
990
990
|
"description": "Whether the whole card is interactive.\n\nWhen set, the card becomes keyboard focusable and Enter or Space triggers a click on the card. Use this only when the whole card has one action or represents one selectable choice.",
|
|
991
991
|
"type": "boolean"
|
|
992
|
-
}
|
|
993
|
-
{ "name": "buttonText" }
|
|
992
|
+
}
|
|
994
993
|
],
|
|
995
994
|
"events": []
|
|
996
995
|
}
|
|
@@ -1543,7 +1542,7 @@
|
|
|
1543
1542
|
},
|
|
1544
1543
|
{
|
|
1545
1544
|
"name": "w-modal",
|
|
1546
|
-
"description": "Modals (or dialogs) display important information that users need to acknowledge.\n\n[Warp component reference](https://warp-ds.github.io/docs/components/modal/frameworks/elements)\n---\n\n\n### **Events:**\n - **shown**\n- **hidden**\n\n### **Slots:**\n - **header** - Typically where you would use the `w-modal-header` component.\n- **content** - The main content of the modal.\n- **footer** - Typically where you would use the `w-modal-footer` component, for things like actions.\n\n### **CSS Properties:**\n - **--w-c-modal-backdrop-color** - undefined _(default: undefined)_\n- **--w-c-modal-bg** - undefined _(default: undefined)_\n- **--w-c-modal-box-shadow** - undefined _(default: undefined)_\n- **--w-c-modal-color** - undefined _(default: undefined)_\n- **--w-c-modal-height** - undefined _(default: undefined)_\n- **--w-c-modal-max-height** - undefined _(default: undefined)_\n- **--w-c-modal-min-height** - undefined _(default: undefined)_\n- **--w-c-modal-translate-distance** - undefined _(default: undefined)_\n- **--w-c-modal-width** - undefined _(default: undefined)_\n\n### **CSS Parts:**\n - **dialog** - the root element inside the component (`<dialog>` element).\n- **wrapper** - container for all elements, direct child of `<dialog>`.\n- **content** - the container for the `content` slot items (children).",
|
|
1545
|
+
"description": "Modals (or dialogs) display important information that users need to acknowledge.\n\n[Warp component reference](https://warp-ds.github.io/docs/components/modal/frameworks/elements)\n---\n\n\n### **Events:**\n - **shown**\n- **hidden**\n\n### **Slots:**\n - **header** - Typically where you would use the `w-modal-header` component.\n- **content** - The main content of the modal.\n- **footer** - Typically where you would use the `w-modal-footer` component, for things like actions.\n\n### **CSS Properties:**\n - **--w-c-modal-backdrop-color** - undefined _(default: undefined)_\n- **--w-c-modal-bg** - undefined _(default: undefined)_\n- **--w-c-modal-box-shadow** - undefined _(default: undefined)_\n- **--w-c-modal-color** - undefined _(default: undefined)_\n- **--w-c-modal-height** - undefined _(default: undefined)_\n- **--w-c-modal-max-height** - undefined _(default: undefined)_\n- **--w-c-modal-min-height** - undefined _(default: undefined)_\n- **--w-c-modal-translate-distance** - undefined _(default: undefined)_\n- **--w-c-modal-padding-bottom** - undefined _(default: undefined)_\n- **--w-c-modal-width** - undefined _(default: undefined)_\n\n### **CSS Parts:**\n - **dialog** - the root element inside the component (`<dialog>` element).\n- **wrapper** - container for all elements, direct child of `<dialog>`.\n- **content** - the container for the `content` slot items (children).",
|
|
1547
1546
|
"doc-url": "",
|
|
1548
1547
|
"attributes": [
|
|
1549
1548
|
{
|
|
@@ -2853,6 +2852,7 @@
|
|
|
2853
2852
|
{ "name": "--w-c-modal-max-height" },
|
|
2854
2853
|
{ "name": "--w-c-modal-min-height" },
|
|
2855
2854
|
{ "name": "--w-c-modal-translate-distance" },
|
|
2855
|
+
{ "name": "--w-c-modal-padding-bottom" },
|
|
2856
2856
|
{ "name": "--w-c-modal-width" },
|
|
2857
2857
|
{
|
|
2858
2858
|
"name": "--w-c-modal-footer-gap",
|