@ebrains/components 0.3.0-alpha.0 → 0.4.0-alpha.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/cjs/{color-3ffe3072.js → color-88793e49.js} +2 -2
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/eds-accordion_33.cjs.entry.js +2670 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-section.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +48 -1
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +33 -15
- package/dist/cjs/eds-rating.cjs.entry.js +5 -7
- package/dist/cjs/eds-tabs-content.cjs.entry.js +1 -1
- package/dist/cjs/eds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/eds-timeline.cjs.entry.js +3 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +11 -1
- package/dist/cjs/eds-trl.cjs.entry.js +7 -8
- package/dist/cjs/index-f08e4f5c.js +2 -34
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +11 -20
- package/dist/collection/components/eds-alert/eds-alert.js +5 -7
- package/dist/collection/components/eds-alert/eds-alert.stories.js +4 -4
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +24 -22
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +2 -1
- package/dist/collection/components/eds-button/eds-button.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +9 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +14 -8
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.js +57 -2
- package/dist/collection/components/eds-code-block/eds-code-block.stories.js +78 -0
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +11 -21
- package/dist/collection/components/eds-form/eds-form.js +41 -31
- package/dist/collection/components/eds-form/eds-form.stories.js +0 -3
- package/dist/collection/components/eds-frame/eds-frame.stories.js +19 -18
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +4 -1
- package/dist/collection/components/eds-link/eds-link.js +3 -4
- package/dist/collection/components/eds-modal/eds-modal.css +16 -0
- package/dist/collection/components/eds-modal/eds-modal.js +71 -29
- package/dist/collection/components/eds-modal/eds-modal.stories.js +34 -18
- package/dist/collection/components/eds-pagination/eds-pagination.js +13 -9
- package/dist/collection/components/eds-rating/eds-rating.js +8 -10
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.stories.js +12 -11
- package/dist/collection/components/eds-table/eds-table.js +20 -7
- package/dist/collection/components/eds-timeline/eds-timeline.js +3 -2
- package/dist/collection/components/eds-toast/eds-toast.js +21 -0
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +10 -1
- package/dist/collection/components/eds-trl/eds-trl.js +7 -8
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +7 -6
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +8 -39
- package/dist/components/analytics.js +2 -2
- package/dist/components/components.css +12 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/eds-accordion2.js +12 -20
- package/dist/components/eds-alert2.js +5 -7
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +2 -1
- package/dist/components/eds-button2.js +1 -1
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +3 -3
- package/dist/components/eds-card-section.js +3 -3
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +48 -1
- package/dist/components/eds-dropdown2.js +12 -21
- package/dist/components/eds-form.js +37 -12
- package/dist/components/eds-input-select2.js +1 -1
- package/dist/components/eds-link2.js +3 -4
- package/dist/components/eds-modal.js +56 -30
- package/dist/components/eds-pagination2.js +13 -9
- package/dist/components/eds-rating.js +6 -8
- package/dist/components/eds-table2.js +20 -6
- package/dist/components/eds-timeline.js +3 -2
- package/dist/components/eds-toast2.js +21 -0
- package/dist/components/eds-tooltip.js +11 -1
- package/dist/components/eds-trl.js +7 -8
- package/dist/components/p-2dda1ec4.entry.js +1 -0
- package/dist/components/{p-d9788b54.entry.js → p-35ec730b.entry.js} +1 -1
- package/dist/components/{p-e6bfbf51.entry.js → p-5398d652.entry.js} +2 -2
- package/dist/components/{p-e20ed2c7.entry.js → p-610db2b2.entry.js} +1 -1
- package/dist/components/p-832dc95a.entry.js +1 -0
- package/dist/components/p-855aa1a3.entry.js +1 -0
- package/dist/components/{p-52ac3456.entry.js → p-8ddc67a1.entry.js} +1 -1
- package/dist/components/p-ab32b3fc.entry.js +1 -0
- package/dist/components/p-b04eff31.entry.js +1 -0
- package/dist/components/p-b86a4985.js +1 -0
- package/dist/components/{p-2e8459ef.entry.js → p-ba6bafef.entry.js} +1 -1
- package/dist/components/{p-6fc62452.entry.js → p-c3b294a0.entry.js} +1 -1
- package/dist/components/p-c6038449.entry.js +1 -0
- package/dist/components/p-c72c8fb0.entry.js +1 -0
- package/dist/components/p-dd6daa96.entry.js +1 -0
- package/dist/components/{p-73bd0c97.entry.js → p-df94285c.entry.js} +1 -1
- package/dist/esm/{color-0ba8ed56.js → color-bb472c37.js} +2 -2
- package/dist/esm/components.js +1 -1
- package/dist/esm/eds-accordion_33.entry.js +2634 -0
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-section.entry.js +3 -3
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +49 -2
- package/dist/esm/eds-matomo-notice.entry.js +1 -1
- package/dist/esm/eds-pagination_2.entry.js +33 -15
- package/dist/esm/eds-rating.entry.js +5 -7
- package/dist/esm/eds-tabs-content.entry.js +1 -1
- package/dist/esm/eds-tabs.entry.js +1 -1
- package/dist/esm/eds-timeline.entry.js +3 -2
- package/dist/esm/eds-tooltip.entry.js +11 -1
- package/dist/esm/eds-trl.entry.js +7 -8
- package/dist/esm/index-e96badea.js +2 -34
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +560 -427
- package/dist/hydrate/index.mjs +560 -427
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +5 -12
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +0 -18
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +8 -0
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +6 -2
- package/dist/types/components/eds-code-block/eds-code-block.d.ts +43 -3
- package/dist/types/components/eds-code-block/eds-code-block.stories.d.ts +54 -0
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +0 -7
- package/dist/types/components/eds-form/eds-form.d.ts +3 -6
- package/dist/types/components/eds-form/eds-form.stories.d.ts +0 -5
- package/dist/types/components/eds-frame/eds-frame.stories.d.ts +0 -2
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +3 -0
- package/dist/types/components/eds-link/eds-link.d.ts +1 -1
- package/dist/types/components/eds-modal/eds-modal.d.ts +18 -3
- package/dist/types/components/eds-modal/eds-modal.stories.d.ts +9 -0
- package/dist/types/components/eds-rating/eds-rating.d.ts +4 -6
- package/dist/types/components/eds-section/eds-section-core/eds-section-core.stories.d.ts +0 -1
- package/dist/types/components/eds-table/eds-table.d.ts +5 -5
- package/dist/types/components/eds-toast/eds-toast.d.ts +9 -0
- package/dist/types/components.d.ts +66 -84
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +1 -6
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +42 -21
- package/package.json +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +0 -93
- package/dist/cjs/eds-alert.cjs.entry.js +0 -96
- package/dist/cjs/eds-avatar_17.cjs.entry.js +0 -1454
- package/dist/cjs/eds-card-desc_3.cjs.entry.js +0 -117
- package/dist/cjs/eds-card-generic.cjs.entry.js +0 -105
- package/dist/cjs/eds-form.cjs.entry.js +0 -322
- package/dist/cjs/eds-frame.cjs.entry.js +0 -91
- package/dist/cjs/eds-input_7.cjs.entry.js +0 -316
- package/dist/cjs/eds-modal.cjs.entry.js +0 -86
- package/dist/components/p-02e2a62f.entry.js +0 -1
- package/dist/components/p-32f282a9.entry.js +0 -1
- package/dist/components/p-3617841d.entry.js +0 -1
- package/dist/components/p-373673ca.js +0 -1
- package/dist/components/p-3ff76976.entry.js +0 -1
- package/dist/components/p-42b4ecff.entry.js +0 -1
- package/dist/components/p-54c75346.entry.js +0 -1
- package/dist/components/p-5afb626c.entry.js +0 -1
- package/dist/components/p-5d7af761.entry.js +0 -1
- package/dist/components/p-7215789a.entry.js +0 -1
- package/dist/components/p-79887c2c.entry.js +0 -1
- package/dist/components/p-84957b6d.entry.js +0 -1
- package/dist/components/p-96c4deda.entry.js +0 -1
- package/dist/components/p-be6c80da.entry.js +0 -1
- package/dist/components/p-d1f6a722.entry.js +0 -1
- package/dist/components/p-d7a92efb.entry.js +0 -1
- package/dist/components/p-fd27e56c.entry.js +0 -1
- package/dist/esm/eds-accordion.entry.js +0 -89
- package/dist/esm/eds-alert.entry.js +0 -92
- package/dist/esm/eds-avatar_17.entry.js +0 -1434
- package/dist/esm/eds-card-desc_3.entry.js +0 -111
- package/dist/esm/eds-card-generic.entry.js +0 -101
- package/dist/esm/eds-form.entry.js +0 -318
- package/dist/esm/eds-frame.entry.js +0 -87
- package/dist/esm/eds-input_7.entry.js +0 -306
- package/dist/esm/eds-modal.entry.js +0 -82
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { Tag } from "./components/eds-cards/eds-card-generic/eds-card-generic";
|
|
9
|
+
export { Tag } from "./components/eds-cards/eds-card-generic/eds-card-generic";
|
|
8
10
|
export namespace Components {
|
|
9
11
|
interface ColorPrimaryPalette {
|
|
10
12
|
}
|
|
@@ -224,6 +226,12 @@ export namespace Components {
|
|
|
224
226
|
*/
|
|
225
227
|
"triggerClick"?: () => void;
|
|
226
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* `eds-card-desc` is a simple component that renders a card description.
|
|
231
|
+
* It displays a block of text with optional truncation applied using a CSS line clamp.
|
|
232
|
+
* You can customize the description styling via the `descClass` property and control
|
|
233
|
+
* whether or not the text is truncated and to how many lines.
|
|
234
|
+
*/
|
|
227
235
|
interface EdsCardDesc {
|
|
228
236
|
/**
|
|
229
237
|
* A custom CSS class to style the description text. Default is 'f-ui-03-light'.
|
|
@@ -286,9 +294,9 @@ export namespace Components {
|
|
|
286
294
|
*/
|
|
287
295
|
"shortAbbreviation"?: string;
|
|
288
296
|
/**
|
|
289
|
-
*
|
|
297
|
+
* Tags related to the card content.
|
|
290
298
|
*/
|
|
291
|
-
"tags":
|
|
299
|
+
"tags": string | Tag[];
|
|
292
300
|
/**
|
|
293
301
|
* A boolean that determines whether the card should be displayed with a smaller height. If true, the card will use the 'tiny' height class.
|
|
294
302
|
*/
|
|
@@ -352,7 +360,7 @@ export namespace Components {
|
|
|
352
360
|
/**
|
|
353
361
|
* JSON string representing an array of card objects. Each card object can contain properties like `title`, `description`, `avatar`, `headingLevel`, `tags`, `url`, `bg`, `tiny`, and `image`. Example: ```json '[{"title": "Card Title", "description": "Description", "avatar": "/path/to/avatar.jpg", "url": "http://example.com"}]' ```
|
|
354
362
|
*/
|
|
355
|
-
"cards": string |
|
|
363
|
+
"cards": string | [];
|
|
356
364
|
/**
|
|
357
365
|
* Number of columns to span for each card in the grid layout. This value sets the column span on medium (md) and larger screen sizes. Default is `4`.
|
|
358
366
|
*/
|
|
@@ -462,9 +470,14 @@ export namespace Components {
|
|
|
462
470
|
*/
|
|
463
471
|
"withHover": boolean;
|
|
464
472
|
}
|
|
473
|
+
/**
|
|
474
|
+
* A component that displays a code block with syntax highlighting.
|
|
475
|
+
* Uses Prism.js for syntax highlighting. Supports multiple languages such as JavaScript, HTML, CSS,
|
|
476
|
+
* Python, Bash/Shell, and YAML.
|
|
477
|
+
*/
|
|
465
478
|
interface EdsCodeBlock {
|
|
466
479
|
/**
|
|
467
|
-
* The code content to display
|
|
480
|
+
* The code content to display.
|
|
468
481
|
*/
|
|
469
482
|
"code": string;
|
|
470
483
|
/**
|
|
@@ -627,7 +640,7 @@ export namespace Components {
|
|
|
627
640
|
/**
|
|
628
641
|
* A JSON string representing the fields in the form. Example: ```json [ { "name": "email", "label": "Email", "type": "text", "required": true }, { "name": "password", "label": "Password", "type": "password", "required": true } ] ```
|
|
629
642
|
*/
|
|
630
|
-
"fields": string;
|
|
643
|
+
"fields": string | any[];
|
|
631
644
|
/**
|
|
632
645
|
* The name of the form, used for grouping inputs and identifying the form.
|
|
633
646
|
*/
|
|
@@ -636,10 +649,6 @@ export namespace Components {
|
|
|
636
649
|
* If `true`, includes the current form URL in the submission data.
|
|
637
650
|
*/
|
|
638
651
|
"setFormUrl"?: boolean;
|
|
639
|
-
/**
|
|
640
|
-
* If `true`, displays a small alert for messages.
|
|
641
|
-
*/
|
|
642
|
-
"smallAlert"?: boolean;
|
|
643
652
|
/**
|
|
644
653
|
* If `true`, includes a submit button in the form.
|
|
645
654
|
*/
|
|
@@ -1087,22 +1096,6 @@ export namespace Components {
|
|
|
1087
1096
|
"required": boolean;
|
|
1088
1097
|
"value"?: string;
|
|
1089
1098
|
}
|
|
1090
|
-
/**
|
|
1091
|
-
* A custom select input component that supports both static and dynamic options.
|
|
1092
|
-
* Options can be provided in two formats:
|
|
1093
|
-
* 1. Dynamic fetch configuration:
|
|
1094
|
-
* [
|
|
1095
|
-
* { endpoint: "http://localhost/api/applications", value: "_id", label: "title" }
|
|
1096
|
-
* ]
|
|
1097
|
-
* 2. Static options:
|
|
1098
|
-
* [
|
|
1099
|
-
* { value: "react", label: "React" },
|
|
1100
|
-
* { value: "angular", label: "Angular" },
|
|
1101
|
-
* { value: "vue", label: "Vue.js" },
|
|
1102
|
-
* // etc.
|
|
1103
|
-
* ]
|
|
1104
|
-
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
1105
|
-
*/
|
|
1106
1099
|
interface EdsInputSelect {
|
|
1107
1100
|
/**
|
|
1108
1101
|
* If true, the select input will be disabled.
|
|
@@ -1308,6 +1301,10 @@ export namespace Components {
|
|
|
1308
1301
|
* Opens the modal.
|
|
1309
1302
|
*/
|
|
1310
1303
|
"open": () => Promise<void>;
|
|
1304
|
+
/**
|
|
1305
|
+
* Specifies the position of the modal. Acceptable values are: - `"middle"` (default): The modal is centered both vertically and horizontally. - `"top"`: The modal is positioned near the top of the viewport. - `"bottom"`: The modal is positioned near the bottom of the viewport. - `"left"`: The modal is positioned on the left side of the viewport, centered vertically. - `"right"`: The modal is positioned on the right side of the viewport, centered vertically.
|
|
1306
|
+
*/
|
|
1307
|
+
"position": 'middle' | 'top' | 'bottom' | 'left' | 'right';
|
|
1311
1308
|
/**
|
|
1312
1309
|
* The title of the modal.
|
|
1313
1310
|
*/
|
|
@@ -1424,7 +1421,7 @@ export namespace Components {
|
|
|
1424
1421
|
/**
|
|
1425
1422
|
* Mapping of text to star ratings.
|
|
1426
1423
|
*/
|
|
1427
|
-
"textMapping": string |
|
|
1424
|
+
"textMapping": string | string[];
|
|
1428
1425
|
}
|
|
1429
1426
|
/**
|
|
1430
1427
|
* `EdsSectionCore` is a flexible wrapper component for creating structured sections with customizable headings.
|
|
@@ -1895,6 +1892,12 @@ declare global {
|
|
|
1895
1892
|
prototype: HTMLEdsButtonElement;
|
|
1896
1893
|
new (): HTMLEdsButtonElement;
|
|
1897
1894
|
};
|
|
1895
|
+
/**
|
|
1896
|
+
* `eds-card-desc` is a simple component that renders a card description.
|
|
1897
|
+
* It displays a block of text with optional truncation applied using a CSS line clamp.
|
|
1898
|
+
* You can customize the description styling via the `descClass` property and control
|
|
1899
|
+
* whether or not the text is truncated and to how many lines.
|
|
1900
|
+
*/
|
|
1898
1901
|
interface HTMLEdsCardDescElement extends Components.EdsCardDesc, HTMLStencilElement {
|
|
1899
1902
|
}
|
|
1900
1903
|
var HTMLEdsCardDescElement: {
|
|
@@ -1961,6 +1964,11 @@ declare global {
|
|
|
1961
1964
|
prototype: HTMLEdsCardWrapperElement;
|
|
1962
1965
|
new (): HTMLEdsCardWrapperElement;
|
|
1963
1966
|
};
|
|
1967
|
+
/**
|
|
1968
|
+
* A component that displays a code block with syntax highlighting.
|
|
1969
|
+
* Uses Prism.js for syntax highlighting. Supports multiple languages such as JavaScript, HTML, CSS,
|
|
1970
|
+
* Python, Bash/Shell, and YAML.
|
|
1971
|
+
*/
|
|
1964
1972
|
interface HTMLEdsCodeBlockElement extends Components.EdsCodeBlock, HTMLStencilElement {
|
|
1965
1973
|
}
|
|
1966
1974
|
var HTMLEdsCodeBlockElement: {
|
|
@@ -2350,22 +2358,6 @@ declare global {
|
|
|
2350
2358
|
interface HTMLEdsInputSelectElementEventMap {
|
|
2351
2359
|
"changeEvent": string | number;
|
|
2352
2360
|
}
|
|
2353
|
-
/**
|
|
2354
|
-
* A custom select input component that supports both static and dynamic options.
|
|
2355
|
-
* Options can be provided in two formats:
|
|
2356
|
-
* 1. Dynamic fetch configuration:
|
|
2357
|
-
* [
|
|
2358
|
-
* { endpoint: "http://localhost/api/applications", value: "_id", label: "title" }
|
|
2359
|
-
* ]
|
|
2360
|
-
* 2. Static options:
|
|
2361
|
-
* [
|
|
2362
|
-
* { value: "react", label: "React" },
|
|
2363
|
-
* { value: "angular", label: "Angular" },
|
|
2364
|
-
* { value: "vue", label: "Vue.js" },
|
|
2365
|
-
* // etc.
|
|
2366
|
-
* ]
|
|
2367
|
-
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
2368
|
-
*/
|
|
2369
2361
|
interface HTMLEdsInputSelectElement extends Components.EdsInputSelect, HTMLStencilElement {
|
|
2370
2362
|
addEventListener<K extends keyof HTMLEdsInputSelectElementEventMap>(type: K, listener: (this: HTMLEdsInputSelectElement, ev: EdsInputSelectCustomEvent<HTMLEdsInputSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2371
2363
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -3114,6 +3106,12 @@ declare namespace LocalJSX {
|
|
|
3114
3106
|
*/
|
|
3115
3107
|
"triggerClick"?: () => void;
|
|
3116
3108
|
}
|
|
3109
|
+
/**
|
|
3110
|
+
* `eds-card-desc` is a simple component that renders a card description.
|
|
3111
|
+
* It displays a block of text with optional truncation applied using a CSS line clamp.
|
|
3112
|
+
* You can customize the description styling via the `descClass` property and control
|
|
3113
|
+
* whether or not the text is truncated and to how many lines.
|
|
3114
|
+
*/
|
|
3117
3115
|
interface EdsCardDesc {
|
|
3118
3116
|
/**
|
|
3119
3117
|
* A custom CSS class to style the description text. Default is 'f-ui-03-light'.
|
|
@@ -3176,9 +3174,9 @@ declare namespace LocalJSX {
|
|
|
3176
3174
|
*/
|
|
3177
3175
|
"shortAbbreviation"?: string;
|
|
3178
3176
|
/**
|
|
3179
|
-
*
|
|
3177
|
+
* Tags related to the card content.
|
|
3180
3178
|
*/
|
|
3181
|
-
"tags"?:
|
|
3179
|
+
"tags"?: string | Tag[];
|
|
3182
3180
|
/**
|
|
3183
3181
|
* A boolean that determines whether the card should be displayed with a smaller height. If true, the card will use the 'tiny' height class.
|
|
3184
3182
|
*/
|
|
@@ -3242,7 +3240,7 @@ declare namespace LocalJSX {
|
|
|
3242
3240
|
/**
|
|
3243
3241
|
* JSON string representing an array of card objects. Each card object can contain properties like `title`, `description`, `avatar`, `headingLevel`, `tags`, `url`, `bg`, `tiny`, and `image`. Example: ```json '[{"title": "Card Title", "description": "Description", "avatar": "/path/to/avatar.jpg", "url": "http://example.com"}]' ```
|
|
3244
3242
|
*/
|
|
3245
|
-
"cards"?: string |
|
|
3243
|
+
"cards"?: string | [];
|
|
3246
3244
|
/**
|
|
3247
3245
|
* Number of columns to span for each card in the grid layout. This value sets the column span on medium (md) and larger screen sizes. Default is `4`.
|
|
3248
3246
|
*/
|
|
@@ -3352,9 +3350,14 @@ declare namespace LocalJSX {
|
|
|
3352
3350
|
*/
|
|
3353
3351
|
"withHover"?: boolean;
|
|
3354
3352
|
}
|
|
3353
|
+
/**
|
|
3354
|
+
* A component that displays a code block with syntax highlighting.
|
|
3355
|
+
* Uses Prism.js for syntax highlighting. Supports multiple languages such as JavaScript, HTML, CSS,
|
|
3356
|
+
* Python, Bash/Shell, and YAML.
|
|
3357
|
+
*/
|
|
3355
3358
|
interface EdsCodeBlock {
|
|
3356
3359
|
/**
|
|
3357
|
-
* The code content to display
|
|
3360
|
+
* The code content to display.
|
|
3358
3361
|
*/
|
|
3359
3362
|
"code"?: string;
|
|
3360
3363
|
/**
|
|
@@ -3517,7 +3520,7 @@ declare namespace LocalJSX {
|
|
|
3517
3520
|
/**
|
|
3518
3521
|
* A JSON string representing the fields in the form. Example: ```json [ { "name": "email", "label": "Email", "type": "text", "required": true }, { "name": "password", "label": "Password", "type": "password", "required": true } ] ```
|
|
3519
3522
|
*/
|
|
3520
|
-
"fields"?: string;
|
|
3523
|
+
"fields"?: string | any[];
|
|
3521
3524
|
/**
|
|
3522
3525
|
* The name of the form, used for grouping inputs and identifying the form.
|
|
3523
3526
|
*/
|
|
@@ -3530,10 +3533,6 @@ declare namespace LocalJSX {
|
|
|
3530
3533
|
* If `true`, includes the current form URL in the submission data.
|
|
3531
3534
|
*/
|
|
3532
3535
|
"setFormUrl"?: boolean;
|
|
3533
|
-
/**
|
|
3534
|
-
* If `true`, displays a small alert for messages.
|
|
3535
|
-
*/
|
|
3536
|
-
"smallAlert"?: boolean;
|
|
3537
3536
|
/**
|
|
3538
3537
|
* If `true`, includes a submit button in the form.
|
|
3539
3538
|
*/
|
|
@@ -3988,22 +3987,6 @@ declare namespace LocalJSX {
|
|
|
3988
3987
|
"required"?: boolean;
|
|
3989
3988
|
"value"?: string;
|
|
3990
3989
|
}
|
|
3991
|
-
/**
|
|
3992
|
-
* A custom select input component that supports both static and dynamic options.
|
|
3993
|
-
* Options can be provided in two formats:
|
|
3994
|
-
* 1. Dynamic fetch configuration:
|
|
3995
|
-
* [
|
|
3996
|
-
* { endpoint: "http://localhost/api/applications", value: "_id", label: "title" }
|
|
3997
|
-
* ]
|
|
3998
|
-
* 2. Static options:
|
|
3999
|
-
* [
|
|
4000
|
-
* { value: "react", label: "React" },
|
|
4001
|
-
* { value: "angular", label: "Angular" },
|
|
4002
|
-
* { value: "vue", label: "Vue.js" },
|
|
4003
|
-
* // etc.
|
|
4004
|
-
* ]
|
|
4005
|
-
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
4006
|
-
*/
|
|
4007
3990
|
interface EdsInputSelect {
|
|
4008
3991
|
/**
|
|
4009
3992
|
* If true, the select input will be disabled.
|
|
@@ -4213,6 +4196,10 @@ declare namespace LocalJSX {
|
|
|
4213
4196
|
* This component is useful for displaying overlay content in a structured and accessible manner, with controls for dynamic visibility and content truncation.
|
|
4214
4197
|
*/
|
|
4215
4198
|
interface EdsModal {
|
|
4199
|
+
/**
|
|
4200
|
+
* Specifies the position of the modal. Acceptable values are: - `"middle"` (default): The modal is centered both vertically and horizontally. - `"top"`: The modal is positioned near the top of the viewport. - `"bottom"`: The modal is positioned near the bottom of the viewport. - `"left"`: The modal is positioned on the left side of the viewport, centered vertically. - `"right"`: The modal is positioned on the right side of the viewport, centered vertically.
|
|
4201
|
+
*/
|
|
4202
|
+
"position"?: 'middle' | 'top' | 'bottom' | 'left' | 'right';
|
|
4216
4203
|
/**
|
|
4217
4204
|
* The title of the modal.
|
|
4218
4205
|
*/
|
|
@@ -4324,7 +4311,7 @@ declare namespace LocalJSX {
|
|
|
4324
4311
|
/**
|
|
4325
4312
|
* Mapping of text to star ratings.
|
|
4326
4313
|
*/
|
|
4327
|
-
"textMapping"?: string |
|
|
4314
|
+
"textMapping"?: string | string[];
|
|
4328
4315
|
}
|
|
4329
4316
|
/**
|
|
4330
4317
|
* `EdsSectionCore` is a flexible wrapper component for creating structured sections with customizable headings.
|
|
@@ -4807,6 +4794,12 @@ declare module "@stencil/core" {
|
|
|
4807
4794
|
* This component is suitable for buttons, links, and other interactive elements within an interface.
|
|
4808
4795
|
*/
|
|
4809
4796
|
"eds-button": LocalJSX.EdsButton & JSXBase.HTMLAttributes<HTMLEdsButtonElement>;
|
|
4797
|
+
/**
|
|
4798
|
+
* `eds-card-desc` is a simple component that renders a card description.
|
|
4799
|
+
* It displays a block of text with optional truncation applied using a CSS line clamp.
|
|
4800
|
+
* You can customize the description styling via the `descClass` property and control
|
|
4801
|
+
* whether or not the text is truncated and to how many lines.
|
|
4802
|
+
*/
|
|
4810
4803
|
"eds-card-desc": LocalJSX.EdsCardDesc & JSXBase.HTMLAttributes<HTMLEdsCardDescElement>;
|
|
4811
4804
|
/**
|
|
4812
4805
|
* `EdsCardGeneric` is a versatile card component designed to display rich content such as titles, descriptions, images, and tags.
|
|
@@ -4833,6 +4826,11 @@ declare module "@stencil/core" {
|
|
|
4833
4826
|
"eds-card-title": LocalJSX.EdsCardTitle & JSXBase.HTMLAttributes<HTMLEdsCardTitleElement>;
|
|
4834
4827
|
"eds-card-tool": LocalJSX.EdsCardTool & JSXBase.HTMLAttributes<HTMLEdsCardToolElement>;
|
|
4835
4828
|
"eds-card-wrapper": LocalJSX.EdsCardWrapper & JSXBase.HTMLAttributes<HTMLEdsCardWrapperElement>;
|
|
4829
|
+
/**
|
|
4830
|
+
* A component that displays a code block with syntax highlighting.
|
|
4831
|
+
* Uses Prism.js for syntax highlighting. Supports multiple languages such as JavaScript, HTML, CSS,
|
|
4832
|
+
* Python, Bash/Shell, and YAML.
|
|
4833
|
+
*/
|
|
4836
4834
|
"eds-code-block": LocalJSX.EdsCodeBlock & JSXBase.HTMLAttributes<HTMLEdsCodeBlockElement>;
|
|
4837
4835
|
"eds-components-section": LocalJSX.EdsComponentsSection & JSXBase.HTMLAttributes<HTMLEdsComponentsSectionElement>;
|
|
4838
4836
|
"eds-docs-palettes": LocalJSX.EdsDocsPalettes & JSXBase.HTMLAttributes<HTMLEdsDocsPalettesElement>;
|
|
@@ -4975,22 +4973,6 @@ declare module "@stencil/core" {
|
|
|
4975
4973
|
"eds-input-label": LocalJSX.EdsInputLabel & JSXBase.HTMLAttributes<HTMLEdsInputLabelElement>;
|
|
4976
4974
|
"eds-input-range": LocalJSX.EdsInputRange & JSXBase.HTMLAttributes<HTMLEdsInputRangeElement>;
|
|
4977
4975
|
"eds-input-search": LocalJSX.EdsInputSearch & JSXBase.HTMLAttributes<HTMLEdsInputSearchElement>;
|
|
4978
|
-
/**
|
|
4979
|
-
* A custom select input component that supports both static and dynamic options.
|
|
4980
|
-
* Options can be provided in two formats:
|
|
4981
|
-
* 1. Dynamic fetch configuration:
|
|
4982
|
-
* [
|
|
4983
|
-
* { endpoint: "http://localhost/api/applications", value: "_id", label: "title" }
|
|
4984
|
-
* ]
|
|
4985
|
-
* 2. Static options:
|
|
4986
|
-
* [
|
|
4987
|
-
* { value: "react", label: "React" },
|
|
4988
|
-
* { value: "angular", label: "Angular" },
|
|
4989
|
-
* { value: "vue", label: "Vue.js" },
|
|
4990
|
-
* // etc.
|
|
4991
|
-
* ]
|
|
4992
|
-
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
4993
|
-
*/
|
|
4994
4976
|
"eds-input-select": LocalJSX.EdsInputSelect & JSXBase.HTMLAttributes<HTMLEdsInputSelectElement>;
|
|
4995
4977
|
/**
|
|
4996
4978
|
* `EdsLink` is a versatile link component offering different styles and behaviors.
|
|
@@ -18,12 +18,7 @@ export declare class EdsCardSection {
|
|
|
18
18
|
* '[{"title": "Card Title", "description": "Description", "avatar": "/path/to/avatar.jpg", "url": "http://example.com"}]'
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
cards: string |
|
|
22
|
-
title: string;
|
|
23
|
-
description: string;
|
|
24
|
-
tags: string;
|
|
25
|
-
url: string;
|
|
26
|
-
}[];
|
|
21
|
+
cards: string | [];
|
|
27
22
|
/**
|
|
28
23
|
* Number of columns to span for each card in the grid layout.
|
|
29
24
|
* This value sets the column span on medium (md) and larger screen sizes.
|
|
@@ -21,32 +21,53 @@ declare const _default: {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
args: {
|
|
24
|
-
cards:
|
|
25
|
-
cols: number;
|
|
26
|
-
extraClass: string;
|
|
27
|
-
};
|
|
28
|
-
parameters: {};
|
|
29
|
-
};
|
|
30
|
-
export default _default;
|
|
31
|
-
export declare const WithString: {
|
|
32
|
-
render: (args: any) => string;
|
|
33
|
-
};
|
|
34
|
-
export declare const WithObject: {
|
|
35
|
-
render: (args: any) => HTMLEdsCardSectionElement;
|
|
36
|
-
args: {
|
|
37
|
-
cards: {
|
|
24
|
+
cards: ({
|
|
38
25
|
title: string;
|
|
39
26
|
description: string;
|
|
27
|
+
url: string;
|
|
28
|
+
avatar: string;
|
|
29
|
+
shortAbbreviation: string;
|
|
30
|
+
headingLevel: string;
|
|
40
31
|
tags: string;
|
|
32
|
+
tiny: boolean;
|
|
33
|
+
bg: boolean;
|
|
34
|
+
withHover: boolean;
|
|
35
|
+
image: {
|
|
36
|
+
src: string;
|
|
37
|
+
alt: string;
|
|
38
|
+
srcset: string;
|
|
39
|
+
sizes: string;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
lazyload: boolean;
|
|
43
|
+
};
|
|
44
|
+
} | {
|
|
45
|
+
title: string;
|
|
46
|
+
description: string;
|
|
41
47
|
url: string;
|
|
42
|
-
|
|
48
|
+
avatar: string;
|
|
49
|
+
shortAbbreviation: string;
|
|
50
|
+
headingLevel: string;
|
|
51
|
+
tags: string;
|
|
52
|
+
tiny: boolean;
|
|
53
|
+
bg: boolean;
|
|
54
|
+
withHover: boolean;
|
|
55
|
+
image: {
|
|
56
|
+
src: string;
|
|
57
|
+
alt: string;
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
lazyload: boolean;
|
|
61
|
+
srcset?: undefined;
|
|
62
|
+
sizes?: undefined;
|
|
63
|
+
};
|
|
64
|
+
})[];
|
|
43
65
|
cols: number;
|
|
44
66
|
extraClass: string;
|
|
45
67
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
68
|
+
parameters: {};
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
71
|
+
export declare const Default: {
|
|
72
|
+
render: (args: any) => HTMLEdsCardSectionElement;
|
|
52
73
|
};
|
package/package.json
CHANGED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-f08e4f5c.js');
|
|
6
|
-
|
|
7
|
-
const edsAccordionCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.min-h-36{min-height:2.25rem}.min-h-44{min-height:2.75rem}.min-h-56{min-height:3.5rem}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.relative{position:relative}.absolute{position:absolute}.inset-x-16{left:1rem;right:1rem}.top-16{top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-md{border-radius:12px}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.text-light{color:var(--grey-700)}.z-1{z-index:1}.z-10{z-index:10}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.h-0{height:0rem}.h-auto{height:auto}.pt-20{padding-top:1.25rem}.overflow-hidden{overflow:hidden}.grid{display:grid}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-16{padding:1rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.text-left{text-align:left}.text-center{text-align:center}";
|
|
8
|
-
const EdsAccordionStyle0 = edsAccordionCss;
|
|
9
|
-
|
|
10
|
-
const EdsAccordion = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.accordionChange = index.createEvent(this, "accordionChange", 7);
|
|
14
|
-
/**
|
|
15
|
-
* Handles the click event on the accordion header to toggle expansion.
|
|
16
|
-
* Toggles the `isExpanded` state and emits the `accordionChange` event.
|
|
17
|
-
*/
|
|
18
|
-
this.handleClick = () => {
|
|
19
|
-
this.isExpanded = !this.isExpanded;
|
|
20
|
-
this.accordionChange.emit(this.isExpanded);
|
|
21
|
-
this.setPanelHeight();
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Calculates and sets the panel height based on the content height
|
|
25
|
-
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
26
|
-
*/
|
|
27
|
-
this.setPanelHeight = () => {
|
|
28
|
-
if (this.childContentRef) {
|
|
29
|
-
this.shortContent =
|
|
30
|
-
this.wrapperRef.scrollWidth > 830 && !this.description
|
|
31
|
-
? this.childContentRef.scrollHeight <= 80
|
|
32
|
-
: this.childContentRef.scrollHeight <= 20;
|
|
33
|
-
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
this.title = undefined;
|
|
37
|
-
this.description = undefined;
|
|
38
|
-
this.switchBg = true;
|
|
39
|
-
this.expanded = false;
|
|
40
|
-
this.clampText = true;
|
|
41
|
-
this.minHeightContent = false;
|
|
42
|
-
this.isExpanded = this.expanded;
|
|
43
|
-
this.panelHeight = 0;
|
|
44
|
-
this.shortContent = false;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
48
|
-
* to recalculate height on window resize.
|
|
49
|
-
*/
|
|
50
|
-
componentDidLoad() {
|
|
51
|
-
this.setPanelHeight();
|
|
52
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
53
|
-
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
54
|
-
this.emitContext(btn);
|
|
55
|
-
window.addEventListener('resize', this.setPanelHeight);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
59
|
-
* This event provides context information about the breadcrumb component.
|
|
60
|
-
*
|
|
61
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
62
|
-
*/
|
|
63
|
-
emitContext(linkElement) {
|
|
64
|
-
const event = new CustomEvent('parentContext', {
|
|
65
|
-
detail: {
|
|
66
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
67
|
-
identifier: null
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
linkElement.dispatchEvent(event);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
74
|
-
*/
|
|
75
|
-
disconnectedCallback() {
|
|
76
|
-
window.removeEventListener('resize', this.setPanelHeight);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
80
|
-
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
81
|
-
*/
|
|
82
|
-
render() {
|
|
83
|
-
const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
|
|
84
|
-
return (index.h("div", { key: '1f8ea188c4b39f6d1a8d10cdbf43d3df88d1281f', ref: (el) => (this.wrapperRef = el), class: `container flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
|
|
85
|
-
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
86
|
-
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
87
|
-
${minHeightContentClass}` }, index.h("h3", { key: '4490bdc1a18b99850e8db8ae1c38fcb37912ec0d', class: "mr-auto f-heading-06 text-left absolute inset-x-16 top-16 line-clamp-1" }, this.title), index.h("div", { key: '82df433a9cc6805a735300fd1bb52f41c639c992', class: "ml-auto" }, index.h("eds-button", { key: '9965d5eecfa02fbea08c23c44d325417767f6495', id: "accordionId", intent: "tertiary", "aria-expanded": this.isExpanded || this.shortContent, "aria-controls": "accordionId", class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`, onClick: this.handleClick, icon: "chevron-down" })), index.h("div", { key: '7ab8d2d07d55fa05c5e5647d1d00d1165f0d40ce', class: `w-full` }, this.description ? (index.h("span", { class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}` }, this.description)) : null, index.h("section", { key: 'cb122dd5433d7012cba6f3769f79e92a155c45d7', id: "sectionId", "aria-hidden": !this.isExpanded, class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`, style: { height: this.isExpanded ? 'auto' : '0' } }, index.h("div", { key: '0c2e1d9b38f21f0cb7f50aa3923edcc448418e3f', ref: (el) => (this.childContentRef = el), class: `accordion-content effect-color pt-20`, "aria-hidden": !this.isExpanded }, index.h("span", { key: 'd119c88d54e8d5e83d4cc3d4d16d1cd53d689bc7', class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}` }, index.h("slot", { key: 'b2a6917ec65bc808389a2d1c77cd1183f00cbaa1' })))))));
|
|
88
|
-
}
|
|
89
|
-
get el() { return index.getElement(this); }
|
|
90
|
-
};
|
|
91
|
-
EdsAccordion.style = EdsAccordionStyle0;
|
|
92
|
-
|
|
93
|
-
exports.eds_accordion = EdsAccordion;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-f08e4f5c.js');
|
|
6
|
-
const index$1 = require('./index-ab9fbefe.js');
|
|
7
|
-
|
|
8
|
-
const edsAlertCss = ":root {\n font-optical-sizing: auto;\n}\nhtml,\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n/*\n:focus[data-focus-method=\"mouse\"],\n:focus[data-focus-method=\"touch\"] {\n outline: none !important;\n}\n*/\n/*FADE*/\n/*FADE TRANSLATE Y*/\n/*SLIDE LEFT*/\n/*SLIDE BOTTOM*/\n/*COLLAPSE Y*/\n*, ::before, ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n::backdrop {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n::before,\n::after {\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type='button']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\niframe,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n:root {\n --inner-gutter: 8px;\n}\n@media (min-width: 750px) {\n :root {\n --inner-gutter: 12px;\n }\n}\n@media (min-width: 900px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1024px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1280px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 2200px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n:root {\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n:root {\n --sans: Inter, Helvetica, Arial, sans-serif;\n --f-ui-01-fontFamily: var(--sans);\n --f-ui-01-fontWeight: 800;\n --f-ui-01-fontSize: 18px;\n --f-ui-01-lineHeight: 110%;\n --f-ui-01-letterSpacing: -0.01em;\n}\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n@media (min-width: 750px) {\n :root {\n}\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n@media (min-width: 1024px) {\n :root {\n}\n}\n.f-ui-01 b, .f-ui-01 strong {\n font-weight: var(--f-ui-01---bold-weight, bold);\n}\n:root {\n --grey-300: #e6e6e6;\n --green-200: #d3ffdc;\n --yellow-200: #ffffcb;\n --red-200: #ffe0e1;\n}\n@media (min-width: 750px) {\n .md\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-x-0 > *::before {\n content: none;\n }\n .md\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n@media (min-width: 900px) {\n .lg\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-x-0 > *::before {\n content: none;\n }\n .lg\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border-color: rgba(0, 0, 0, .1 );\n }\n\n &::after {\n content: '';\n }\n}\n/** region TRANSITIONS */\n/** endregion */\n/* region FOCUS */\n/* endregion */\n/* region BG */\n/* endregion */\n/*region shadow*/\n/*endregion*/\n.flex {\n display: flex;\n}\n.w-full {\n width: 100%;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-x-12 {\n -moz-column-gap: 0.75rem;\n column-gap: 0.75rem;\n}\n.space-y-12 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.rounded-lg {\n border-radius: 16px;\n}\n.bg-dark {\n background-color: var(--grey-300);\n}\n.bg-error {\n background-color: var(--red-200);\n}\n.bg-success {\n background-color: var(--green-200);\n}\n.bg-warning {\n background-color: var(--yellow-200);\n}\n.p-16 {\n padding: 1rem;\n}\n.p-20 {\n padding: 1.25rem;\n}\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-20 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-20 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pr-12 {\n padding-right: 0.75rem;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n[class*=underline-] {\n text-decoration-line: underline;\n}\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n.after\\:border-softest::after {\n border-color: rgba(0, 0, 0, .05 );\n}\n";
|
|
9
|
-
const EdsAlertStyle0 = edsAlertCss;
|
|
10
|
-
|
|
11
|
-
const alertStyles = index$1.cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
12
|
-
variants: {
|
|
13
|
-
intent: {
|
|
14
|
-
default: '',
|
|
15
|
-
warning: 'bg-warning',
|
|
16
|
-
error: 'bg-error',
|
|
17
|
-
success: 'bg-success'
|
|
18
|
-
},
|
|
19
|
-
direction: {
|
|
20
|
-
vertical: 'space-y-12',
|
|
21
|
-
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
22
|
-
},
|
|
23
|
-
withBtn: {
|
|
24
|
-
false: '',
|
|
25
|
-
true: ''
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
compoundVariants: [
|
|
29
|
-
{
|
|
30
|
-
direction: 'horizontal',
|
|
31
|
-
withBtn: true,
|
|
32
|
-
class: 'px-20 pr-12 py-12'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
direction: 'horizontal',
|
|
36
|
-
withBtn: false,
|
|
37
|
-
class: 'p-20'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
direction: 'vertical',
|
|
41
|
-
withBtn: true,
|
|
42
|
-
class: 'p-16'
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
direction: 'vertical',
|
|
46
|
-
withBtn: false,
|
|
47
|
-
class: 'px-12 py-20'
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
intent: 'default',
|
|
52
|
-
direction: 'horizontal'
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
const EdsAlert = class {
|
|
56
|
-
constructor(hostRef) {
|
|
57
|
-
index.registerInstance(this, hostRef);
|
|
58
|
-
this.message = undefined;
|
|
59
|
-
this.pressableLabel = undefined;
|
|
60
|
-
this.pressableUrl = undefined;
|
|
61
|
-
this.direction = 'horizontal';
|
|
62
|
-
this.intent = 'default';
|
|
63
|
-
this.withBtn = false;
|
|
64
|
-
}
|
|
65
|
-
componentWillLoad() {
|
|
66
|
-
this.withBtn = Boolean(this.pressableLabel);
|
|
67
|
-
}
|
|
68
|
-
componentDidLoad() {
|
|
69
|
-
// Query all 'eds-link' elements, including those inside shadow DOM
|
|
70
|
-
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
71
|
-
links.forEach((link) => {
|
|
72
|
-
this.emitContext(link);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
emitContext(linkElement) {
|
|
76
|
-
const event = new CustomEvent('parentContext', {
|
|
77
|
-
detail: {
|
|
78
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
79
|
-
identifier: null
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
linkElement.dispatchEvent(event);
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
return (index.h("div", { key: '99518cd34cbfc04691f2f827b53105ef88c03af8', class: alertStyles({
|
|
86
|
-
intent: this.intent,
|
|
87
|
-
direction: this.direction,
|
|
88
|
-
withBtn: this.withBtn
|
|
89
|
-
}), role: "alert" }, index.h("p", { key: '7eca97c849473bb4c8472d11243dc5eb9dded61f', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
90
|
-
(this.pressableUrl ? (index.h("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary" })) : null)));
|
|
91
|
-
}
|
|
92
|
-
get el() { return index.getElement(this); }
|
|
93
|
-
};
|
|
94
|
-
EdsAlert.style = EdsAlertStyle0;
|
|
95
|
-
|
|
96
|
-
exports.eds_alert = EdsAlert;
|