@adobe-commerce/elsie 1.5.0-alpha100 → 1.5.0-alpha10000
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/bin/builders/serve/index.js +3 -1
- package/config/jest.js +3 -3
- package/config/vite.mjs +13 -8
- package/package.json +3 -3
- package/src/components/Button/Button.tsx +2 -0
- package/src/components/Incrementer/Incrementer.css +6 -0
- package/src/components/Incrementer/Incrementer.stories.tsx +18 -0
- package/src/components/Incrementer/Incrementer.tsx +66 -59
- package/src/components/MultiSelect/MultiSelect.css +273 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +457 -0
- package/src/components/MultiSelect/MultiSelect.tsx +763 -0
- package/src/components/MultiSelect/index.ts +11 -0
- package/src/components/Picker/Picker.tsx +5 -3
- package/src/components/Table/Table.css +110 -0
- package/src/components/Table/Table.stories.tsx +761 -0
- package/src/components/Table/Table.tsx +249 -0
- package/src/components/Table/index.ts +11 -0
- package/src/components/TextSwatch/TextSwatch.tsx +5 -2
- package/src/components/ToggleButton/ToggleButton.css +13 -1
- package/src/components/ToggleButton/ToggleButton.stories.tsx +13 -6
- package/src/components/ToggleButton/ToggleButton.tsx +4 -0
- package/src/components/index.ts +5 -3
- package/src/docs/API/render.mdx +16 -0
- package/src/docs/slots.mdx +9 -1
- package/src/i18n/en_US.json +38 -0
- package/src/lib/aem/configs.ts +7 -4
- package/src/lib/render.tsx +21 -7
- package/src/lib/slot.tsx +99 -30
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
export * from '@adobe-commerce/elsie/components/MultiSelect/MultiSelect';
|
|
11
|
+
export { MultiSelect as default } from '@adobe-commerce/elsie/components/MultiSelect/MultiSelect';
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
*******************************************************************/
|
|
9
9
|
|
|
10
10
|
import { Icon } from '@adobe-commerce/elsie/components';
|
|
11
|
-
import '@adobe-commerce/elsie/components/Picker/Picker.css';
|
|
12
11
|
import { ChevronDown } from '@adobe-commerce/elsie/icons';
|
|
13
12
|
import { classes } from '@adobe-commerce/elsie/lib';
|
|
14
13
|
import { FunctionComponent, VNode } from 'preact';
|
|
15
14
|
import { HTMLAttributes, useEffect, useState } from 'preact/compat';
|
|
16
15
|
|
|
16
|
+
import '@adobe-commerce/elsie/components/Picker/Picker.css';
|
|
17
|
+
|
|
17
18
|
type PickerValue = string | null;
|
|
18
19
|
|
|
19
20
|
export interface PickerOption {
|
|
@@ -68,9 +69,10 @@ export const Picker: FunctionComponent<PickerProps> = ({
|
|
|
68
69
|
defaultOption,
|
|
69
70
|
icon,
|
|
70
71
|
className,
|
|
72
|
+
id,
|
|
71
73
|
...props
|
|
72
74
|
}) => {
|
|
73
|
-
const
|
|
75
|
+
const uniqueId = id ?? name ?? `dropin-picker-${Math.random().toString(36)}`;
|
|
74
76
|
const isRequired = !!props?.required;
|
|
75
77
|
|
|
76
78
|
// find the first option that is not disabled
|
|
@@ -154,7 +156,7 @@ export const Picker: FunctionComponent<PickerProps> = ({
|
|
|
154
156
|
)}
|
|
155
157
|
|
|
156
158
|
<select
|
|
157
|
-
id={
|
|
159
|
+
id={uniqueId}
|
|
158
160
|
className={classes([
|
|
159
161
|
'dropin-picker__select',
|
|
160
162
|
`dropin-picker__select--${variant}`,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
|
|
10
|
+
/* https://cssguidelin.es/#bem-like-naming */
|
|
11
|
+
|
|
12
|
+
.dropin-table {
|
|
13
|
+
container-type: inline-size;
|
|
14
|
+
overflow-x: auto;
|
|
15
|
+
font: var(--type-body-1-default-font);
|
|
16
|
+
letter-spacing: var(--type-body-1-default-letter-spacing);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dropin-table__table {
|
|
20
|
+
border-collapse: collapse;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dropin-table__caption {
|
|
25
|
+
font: var(--type-details-caption-1-font);
|
|
26
|
+
letter-spacing: var(--type-details-caption-1-letter-spacing);
|
|
27
|
+
text-align: left;
|
|
28
|
+
margin-bottom: var(--spacing-small);
|
|
29
|
+
caption-side: top;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dropin-table__header__cell {
|
|
33
|
+
font: var(--type-body-1-strong-font);
|
|
34
|
+
letter-spacing: var(--type-body-1-strong-letter-spacing);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dropin-table__header__cell,
|
|
38
|
+
.dropin-table__body__cell {
|
|
39
|
+
padding: var(--spacing-xsmall);
|
|
40
|
+
text-align: left;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dropin-table__header__cell--sortable {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dropin-table__header__row {
|
|
49
|
+
border-bottom: 2px solid var(--color-neutral-400);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dropin-table__body__row {
|
|
53
|
+
border-bottom: 1px solid var(--color-neutral-400);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dropin-table__header__sort-button {
|
|
57
|
+
margin-left: var(--spacing-xsmall);
|
|
58
|
+
vertical-align: middle;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dropin-table__row-details {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dropin-table__row-details--expanded {
|
|
66
|
+
display: table-row;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dropin-table__row-details__cell {
|
|
70
|
+
padding: var(--spacing-small);
|
|
71
|
+
background-color: var(--color-neutral-100);
|
|
72
|
+
border-top: 1px solid var(--color-neutral-300);
|
|
73
|
+
border-bottom: 1px solid var(--color-neutral-400);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Container query for mobile layout */
|
|
77
|
+
@container (max-width: 600px) {
|
|
78
|
+
/* Mobile layout Stacked */
|
|
79
|
+
.dropin-table--mobile-layout-stacked .dropin-table__header {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dropin-table--mobile-layout-stacked .dropin-table__body__cell {
|
|
84
|
+
display: block;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.dropin-table--mobile-layout-stacked .dropin-table__body__cell::before {
|
|
88
|
+
content: attr(data-label);
|
|
89
|
+
font-weight: bold;
|
|
90
|
+
display: block;
|
|
91
|
+
margin-bottom: var(--spacing-xxsmall);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dropin-table--mobile-layout-stacked .dropin-table__row-details__cell {
|
|
95
|
+
display: block;
|
|
96
|
+
padding: var(--spacing-small);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Medium (portrait tablets and large phones, 768px and up) */
|
|
101
|
+
/* @media only screen and (min-width: 768px) { } */
|
|
102
|
+
|
|
103
|
+
/* Large (landscape tablets, 1024px and up) */
|
|
104
|
+
/* @media only screen and (min-width: 1024px) { } */
|
|
105
|
+
|
|
106
|
+
/* XLarge (laptops/desktops, 1366px and up) */
|
|
107
|
+
/* @media only screen and (min-width: 1366px) { } */
|
|
108
|
+
|
|
109
|
+
/* XXlarge (large laptops and desktops, 1920px and up) */
|
|
110
|
+
/* @media only screen and (min-width: 1920px) { } */
|