@daikin-oss/design-system-web-components 1.3.1 → 1.4.0-next.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/CHANGELOG.md +90 -0
- package/dist/cjs/base/dds-element.cjs +1 -1
- package/dist/cjs/components/badge/daikin-badge.cjs +133 -0
- package/dist/cjs/components/badge/daikin-badge.d.cts +85 -0
- package/dist/cjs/components/badge/index.cjs +7 -0
- package/dist/cjs/components/badge/index.d.cts +1 -0
- package/dist/cjs/components/button/daikin-button.d.cts +1 -1
- package/dist/cjs/components/calendar/daikin-calendar.cjs +28 -6
- package/dist/cjs/components/calendar/daikin-calendar.d.cts +9 -0
- package/dist/cjs/components/combobox/daikin-combobox.cjs +6 -3
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +26 -2
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +5 -0
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +5 -7
- package/dist/cjs/components/icon/daikin-icon.cjs +4 -4
- package/dist/cjs/components/icon/daikin-icon.d.cts +8 -0
- package/dist/cjs/components/icon/icons.json.cjs +1 -1
- package/dist/cjs/components/icon/icons.json.d.cts +8 -0
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +1 -1
- package/dist/cjs/components/index.cjs +10 -0
- package/dist/cjs/components/index.d.cts +2 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.d.cts +4 -1
- package/dist/cjs/components/input-group/daikin-input-group.cjs +21 -6
- package/dist/cjs/components/menu/daikin-menu.cjs +21 -10
- package/dist/cjs/components/menu/daikin-menu.d.cts +6 -1
- package/dist/cjs/components/pagination/daikin-pagination.cjs +2 -1
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +2 -2
- package/dist/cjs/components/status-message/daikin-status-message.cjs +110 -0
- package/dist/cjs/components/status-message/daikin-status-message.d.cts +51 -0
- package/dist/cjs/components/status-message/index.cjs +7 -0
- package/dist/cjs/components/status-message/index.d.cts +1 -0
- package/dist/cjs/components/table/daikin-table.cjs +2 -2
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +1 -1
- package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +4 -1
- package/dist/cjs/components/tree/daikin-tree.d.cts +2 -1
- package/dist/cjs/components/tree-item/daikin-tree-item.d.cts +6 -1
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +6 -1
- package/dist/cjs/index.cjs +10 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/calendar-common.cjs +6 -0
- package/dist/cjs/utils/calendar-common.d.cts +7 -0
- package/dist/cjs/utils/notification-common.d.cts +1 -1
- package/dist/cjs-dev/base/dds-element.cjs +1 -1
- package/dist/cjs-dev/components/badge/daikin-badge.cjs +133 -0
- package/dist/cjs-dev/components/badge/daikin-badge.d.cts +85 -0
- package/dist/cjs-dev/components/badge/index.cjs +7 -0
- package/dist/cjs-dev/components/badge/index.d.cts +1 -0
- package/dist/cjs-dev/components/button/daikin-button.d.cts +1 -1
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +28 -6
- package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +9 -0
- package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +6 -3
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +26 -2
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +5 -0
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +5 -7
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +4 -4
- package/dist/cjs-dev/components/icon/daikin-icon.d.cts +8 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +1 -1
- package/dist/cjs-dev/components/icon/icons.json.d.cts +8 -0
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +1 -1
- package/dist/cjs-dev/components/index.cjs +10 -0
- package/dist/cjs-dev/components/index.d.cts +2 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.d.cts +4 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +21 -6
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +21 -10
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +6 -1
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +2 -1
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +2 -2
- package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +110 -0
- package/dist/cjs-dev/components/status-message/daikin-status-message.d.cts +51 -0
- package/dist/cjs-dev/components/status-message/index.cjs +7 -0
- package/dist/cjs-dev/components/status-message/index.d.cts +1 -0
- package/dist/cjs-dev/components/table/daikin-table.cjs +2 -2
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +1 -1
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +4 -1
- package/dist/cjs-dev/components/tree/daikin-tree.d.cts +2 -1
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.d.cts +6 -1
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +6 -1
- package/dist/cjs-dev/index.cjs +10 -0
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/calendar-common.cjs +6 -0
- package/dist/cjs-dev/utils/calendar-common.d.cts +7 -0
- package/dist/cjs-dev/utils/notification-common.d.cts +1 -1
- package/dist/es/base/dds-element.js +1 -1
- package/dist/es/components/badge/daikin-badge.d.ts +85 -0
- package/dist/es/components/badge/daikin-badge.js +134 -0
- package/dist/es/components/badge/index.d.ts +1 -0
- package/dist/es/components/badge/index.js +4 -0
- package/dist/es/components/button/daikin-button.d.ts +1 -1
- package/dist/es/components/calendar/daikin-calendar.d.ts +9 -0
- package/dist/es/components/calendar/daikin-calendar.js +29 -7
- package/dist/es/components/combobox/daikin-combobox.js +6 -3
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +5 -0
- package/dist/es/components/date-picker/daikin-date-picker.js +26 -2
- package/dist/es/components/dropdown/daikin-dropdown.js +6 -8
- package/dist/es/components/icon/daikin-icon.d.ts +8 -0
- package/dist/es/components/icon/daikin-icon.js +4 -4
- package/dist/es/components/icon/icons.json.d.ts +8 -0
- package/dist/es/components/icon/icons.json.js +1 -1
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +1 -1
- package/dist/es/components/index.d.ts +2 -0
- package/dist/es/components/index.js +4 -0
- package/dist/es/components/inline-notification/daikin-inline-notification.d.ts +4 -1
- package/dist/es/components/input-group/daikin-input-group.js +21 -6
- package/dist/es/components/menu/daikin-menu.d.ts +6 -1
- package/dist/es/components/menu/daikin-menu.js +21 -10
- package/dist/es/components/pagination/daikin-pagination.js +2 -1
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es/components/status-message/daikin-status-message.d.ts +51 -0
- package/dist/es/components/status-message/daikin-status-message.js +111 -0
- package/dist/es/components/status-message/index.d.ts +1 -0
- package/dist/es/components/status-message/index.js +4 -0
- package/dist/es/components/table/daikin-table.js +2 -2
- package/dist/es/components/time-picker/daikin-time-picker.js +1 -1
- package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +4 -1
- package/dist/es/components/tree/daikin-tree.d.ts +2 -1
- package/dist/es/components/tree-item/daikin-tree-item.d.ts +6 -1
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +6 -1
- package/dist/es/index.js +4 -0
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/calendar-common.d.ts +7 -0
- package/dist/es/utils/calendar-common.js +6 -0
- package/dist/es/utils/notification-common.d.ts +1 -1
- package/dist/es-dev/base/dds-element.js +1 -1
- package/dist/es-dev/components/badge/daikin-badge.d.ts +85 -0
- package/dist/es-dev/components/badge/daikin-badge.js +134 -0
- package/dist/es-dev/components/badge/index.d.ts +1 -0
- package/dist/es-dev/components/badge/index.js +4 -0
- package/dist/es-dev/components/button/daikin-button.d.ts +1 -1
- package/dist/es-dev/components/calendar/daikin-calendar.d.ts +9 -0
- package/dist/es-dev/components/calendar/daikin-calendar.js +29 -7
- package/dist/es-dev/components/combobox/daikin-combobox.js +6 -3
- package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +5 -0
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +26 -2
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +6 -8
- package/dist/es-dev/components/icon/daikin-icon.d.ts +8 -0
- package/dist/es-dev/components/icon/daikin-icon.js +4 -4
- package/dist/es-dev/components/icon/icons.json.d.ts +8 -0
- package/dist/es-dev/components/icon/icons.json.js +1 -1
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +1 -1
- package/dist/es-dev/components/index.d.ts +2 -0
- package/dist/es-dev/components/index.js +4 -0
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.d.ts +4 -1
- package/dist/es-dev/components/input-group/daikin-input-group.js +21 -6
- package/dist/es-dev/components/menu/daikin-menu.d.ts +6 -1
- package/dist/es-dev/components/menu/daikin-menu.js +21 -10
- package/dist/es-dev/components/pagination/daikin-pagination.js +2 -1
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es-dev/components/status-message/daikin-status-message.d.ts +51 -0
- package/dist/es-dev/components/status-message/daikin-status-message.js +111 -0
- package/dist/es-dev/components/status-message/index.d.ts +1 -0
- package/dist/es-dev/components/status-message/index.js +4 -0
- package/dist/es-dev/components/table/daikin-table.js +2 -2
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +1 -1
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +4 -1
- package/dist/es-dev/components/tree/daikin-tree.d.ts +2 -1
- package/dist/es-dev/components/tree-item/daikin-tree-item.d.ts +6 -1
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +6 -1
- package/dist/es-dev/index.js +4 -0
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/calendar-common.d.ts +7 -0
- package/dist/es-dev/utils/calendar-common.js +6 -0
- package/dist/es-dev/utils/notification-common.d.ts +1 -1
- package/icons/neutral.svg +3 -0
- package/icons/notification.svg +3 -0
- package/package.json +1 -1
|
@@ -41,7 +41,10 @@ export declare class DaikinInlineNotification extends DDSElement {
|
|
|
41
41
|
*/
|
|
42
42
|
closable: boolean;
|
|
43
43
|
/**
|
|
44
|
-
* The timestamp to display.
|
|
44
|
+
* The timestamp to display. Accepts a Date object and displays it in YYYY/MM/DD format.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* element.timestamp = new Date();
|
|
45
48
|
*/
|
|
46
49
|
timestamp: Date | null;
|
|
47
50
|
/**
|
|
@@ -6,6 +6,7 @@ import "../../base/dds-form-element.js";
|
|
|
6
6
|
import { ddsElement } from "../../base/decorators.js";
|
|
7
7
|
import "../../base/define.js";
|
|
8
8
|
import tailwindStyles from "../../tailwind.css.js";
|
|
9
|
+
import "../status-message/daikin-status-message.js";
|
|
9
10
|
var __defProp = Object.defineProperty;
|
|
10
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
12
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -110,6 +111,25 @@ let DaikinInputGroup = class extends DDSElement {
|
|
|
110
111
|
textareaLimitExceedError: this.textareaLimitExceedError,
|
|
111
112
|
none: ""
|
|
112
113
|
}[helperTextVariant];
|
|
114
|
+
const formatHelperText = (helperTextVariant2, helperText2) => {
|
|
115
|
+
switch (helperTextVariant2) {
|
|
116
|
+
case "error":
|
|
117
|
+
case "textareaLimitExceedError":
|
|
118
|
+
return html`<daikin-status-message
|
|
119
|
+
status="negative"
|
|
120
|
+
message-role="alert"
|
|
121
|
+
size="small"
|
|
122
|
+
>
|
|
123
|
+
${helperText2}
|
|
124
|
+
</daikin-status-message>`;
|
|
125
|
+
case "none":
|
|
126
|
+
return nothing;
|
|
127
|
+
default:
|
|
128
|
+
return html`<span class=${cvaHelper({ type: helperTextVariant2 })}>
|
|
129
|
+
${helperText2}
|
|
130
|
+
</span>`;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
113
133
|
return html`<fieldset class="contents" ?disabled=${this.disabled}>
|
|
114
134
|
<label
|
|
115
135
|
class="flex flex-col justify-center gap-2 w-full text-ddt-color-common-text-primary font-daikinSerif"
|
|
@@ -122,12 +142,7 @@ let DaikinInputGroup = class extends DDSElement {
|
|
|
122
142
|
${this.required}
|
|
123
143
|
</span>` : nothing}
|
|
124
144
|
</div>
|
|
125
|
-
|
|
126
|
-
class=${cvaHelper({ type: helperTextVariant })}
|
|
127
|
-
aria-live=${helperTextVariant === "error" ? "polite" : "off"}
|
|
128
|
-
>
|
|
129
|
-
${helperText}
|
|
130
|
-
</span>
|
|
145
|
+
${formatHelperText(helperTextVariant, helperText)}
|
|
131
146
|
<slot
|
|
132
147
|
@slotchange=${this._handleSlotChange}
|
|
133
148
|
@input=${this._handleInput}
|
|
@@ -45,7 +45,7 @@ export declare class DaikinMenu extends DDSElement {
|
|
|
45
45
|
* Specifies the initial position of the menu relative to the trigger.
|
|
46
46
|
* However, if there isn't enough space in the specified direction, the menu will automatically adjust its direction.
|
|
47
47
|
*/
|
|
48
|
-
placement: "top" | "bottom" | "left" | "right";
|
|
48
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
49
49
|
/**
|
|
50
50
|
* Whether the menu is open.
|
|
51
51
|
*/
|
|
@@ -76,6 +76,11 @@ export declare class DaikinMenu extends DDSElement {
|
|
|
76
76
|
private _reflectDynamicProperties;
|
|
77
77
|
private _handleSlotChange;
|
|
78
78
|
private _handleTriggerClick;
|
|
79
|
+
private _handleTouchEnd;
|
|
80
|
+
/**
|
|
81
|
+
* Handles click events on the menu-item.
|
|
82
|
+
* When the popoverValue is manual, the logic for closing the popover should be entirely controlled by the developer and not be the responsibility of the component.
|
|
83
|
+
*/
|
|
79
84
|
private _handleClick;
|
|
80
85
|
private _handleBeforeToggle;
|
|
81
86
|
private _handleToggle;
|
|
@@ -93,19 +93,27 @@ let DaikinMenu = class extends DDSElement {
|
|
|
93
93
|
this._reflectStaticProperties();
|
|
94
94
|
}
|
|
95
95
|
_handleTriggerClick(event) {
|
|
96
|
-
if (this.trigger
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
96
|
+
if (this.trigger !== "click") return;
|
|
97
|
+
event.preventDefault();
|
|
98
|
+
this.open = !this.open;
|
|
99
|
+
if (this.open) {
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
this._lists[0].focusFirstItem();
|
|
102
|
+
});
|
|
104
103
|
}
|
|
105
104
|
}
|
|
105
|
+
_handleTouchEnd(event) {
|
|
106
|
+
if (this.trigger !== "click") return;
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
this.open = !this.open;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Handles click events on the menu-item.
|
|
112
|
+
* When the popoverValue is manual, the logic for closing the popover should be entirely controlled by the developer and not be the responsibility of the component.
|
|
113
|
+
*/
|
|
106
114
|
_handleClick(event) {
|
|
107
115
|
event.preventDefault();
|
|
108
|
-
if (event.target instanceof DaikinListItem && !event.target.disabled) {
|
|
116
|
+
if (event.target instanceof DaikinListItem && !event.target.disabled && this.popoverValue === "auto") {
|
|
109
117
|
this.open = false;
|
|
110
118
|
}
|
|
111
119
|
}
|
|
@@ -132,7 +140,10 @@ let DaikinMenu = class extends DDSElement {
|
|
|
132
140
|
aria-describedby="menu"
|
|
133
141
|
${this._autoUpdateController.refReference()}
|
|
134
142
|
>
|
|
135
|
-
<slot
|
|
143
|
+
<slot
|
|
144
|
+
@click=${this._handleTriggerClick}
|
|
145
|
+
@touchend=${this._handleTouchEnd}
|
|
146
|
+
></slot>
|
|
136
147
|
</div>
|
|
137
148
|
<span
|
|
138
149
|
id="menu"
|
|
@@ -137,9 +137,10 @@ let DaikinPagination = class extends DDSElement {
|
|
|
137
137
|
this.current,
|
|
138
138
|
this.window
|
|
139
139
|
);
|
|
140
|
+
const landmarkLabel = this.ariaLabel || "Pagination";
|
|
140
141
|
return html`
|
|
141
142
|
<div
|
|
142
|
-
aria-label
|
|
143
|
+
aria-label=${landmarkLabel}
|
|
143
144
|
role="navigation"
|
|
144
145
|
class="inline-flex flex-wrap"
|
|
145
146
|
>
|
|
@@ -51,7 +51,7 @@ let DaikinProgressIndicatorItem = class extends DDSElement {
|
|
|
51
51
|
this.status === "inprogress" ? "step" : void 0
|
|
52
52
|
)}
|
|
53
53
|
>
|
|
54
|
-
<div class="flex flex-col gap-1 w-full">
|
|
54
|
+
<div class="flex flex-col gap-1 w-full overflow-auto">
|
|
55
55
|
<slot class="font-bold leading-[130%]"></slot>
|
|
56
56
|
<slot name="description" class="text-sm leading-[130%]"></slot>
|
|
57
57
|
</div>
|
|
@@ -71,7 +71,7 @@ DaikinProgressIndicatorItem.styles = css`
|
|
|
71
71
|
:host {
|
|
72
72
|
display: block;
|
|
73
73
|
width: 100%;
|
|
74
|
-
min-width:
|
|
74
|
+
min-width: 5rem;
|
|
75
75
|
}
|
|
76
76
|
`;
|
|
77
77
|
__decorateClass([
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DDSElement } from "../../base/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A status message is a concise UI component for displaying status feedback, notifications, or contextual information to users. It typically indicates success, warning, error, or other states, helping users quickly understand the current state or important updates in the interface.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* import "@daikin-oss/design-system-web-components/components/status-message/index.js";
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <daikin-status-message>description</daikin-status-message>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class DaikinStatusMessage extends DDSElement {
|
|
16
|
+
static readonly styles: import('lit').CSSResult;
|
|
17
|
+
/**
|
|
18
|
+
* Sets the size of the status message component.
|
|
19
|
+
* - "small": Compact status message style.
|
|
20
|
+
* - "medium": Default status message style.
|
|
21
|
+
*/
|
|
22
|
+
size: "small" | "medium";
|
|
23
|
+
/**
|
|
24
|
+
* Specifies the status of the message.
|
|
25
|
+
* - "neutral": Neutral or incomplete status.
|
|
26
|
+
* - "positive": Success or confirmation status.
|
|
27
|
+
* - "negative": Error or failure status.
|
|
28
|
+
* - "warning": Warning or caution status.
|
|
29
|
+
*/
|
|
30
|
+
status: "neutral" | "positive" | "negative" | "warning";
|
|
31
|
+
/**
|
|
32
|
+
* Sets the ARIA role of the status message component.
|
|
33
|
+
* - "[alert](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role)": Indicates an important message that requires user attention.
|
|
34
|
+
* - "[status](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/status_role)": Indicates an advisory message that provides feedback or updates.
|
|
35
|
+
* - `null` (default): No specific ARIA role, meaning the message content will not be announced automatically when it changes.
|
|
36
|
+
*/
|
|
37
|
+
statusMessageRole: "alert" | "status" | null;
|
|
38
|
+
/**
|
|
39
|
+
* Provides an alternative text for screen readers that is read by assistive technologies but not displayed visually.
|
|
40
|
+
*
|
|
41
|
+
* e.g. If you use the message component for a password validation status (ensure the statusMessageRole is `status`), you might do the following:
|
|
42
|
+
* When the user inputs an 8-character password, set the status to `positive` and update the screenReaderText to "Met,". This allows the screen reader to announce the full updated message, such as "Met, minimum 8 characters".
|
|
43
|
+
*/
|
|
44
|
+
screenReaderText: string | null;
|
|
45
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
46
|
+
}
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
"daikin-status-message": DaikinStatusMessage;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { unsafeCSS, css, nothing, html } from "lit";
|
|
3
|
+
import { property } from "lit/decorators.js";
|
|
4
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
6
|
+
import "../../base/dds-form-element.js";
|
|
7
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
8
|
+
import "../../base/define.js";
|
|
9
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result) __defProp(target, key, result);
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
20
|
+
const cvaWrapper = cva(
|
|
21
|
+
[
|
|
22
|
+
"flex",
|
|
23
|
+
"items-center",
|
|
24
|
+
"size-full",
|
|
25
|
+
"font-daikinSerif",
|
|
26
|
+
"font-normal",
|
|
27
|
+
"leading-[130%]",
|
|
28
|
+
"gap-1",
|
|
29
|
+
"break-all",
|
|
30
|
+
"before:content-['']",
|
|
31
|
+
"before:flex-none"
|
|
32
|
+
],
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
size: {
|
|
36
|
+
small: ["before:size-4", "text-sm", "h-[18px]"],
|
|
37
|
+
medium: ["before:size-6", "text-base", "h-6"]
|
|
38
|
+
},
|
|
39
|
+
status: {
|
|
40
|
+
neutral: [
|
|
41
|
+
"text-ddt-color-common-text-primary",
|
|
42
|
+
"before:i-daikin-neutral",
|
|
43
|
+
"before:text-ddt-color-common-disabled"
|
|
44
|
+
],
|
|
45
|
+
positive: [
|
|
46
|
+
"text-ddt-color-common-text-primary",
|
|
47
|
+
"before:i-daikin-success",
|
|
48
|
+
"before:text-ddt-color-common-success"
|
|
49
|
+
],
|
|
50
|
+
negative: [
|
|
51
|
+
"text-ddt-color-common-danger-default",
|
|
52
|
+
"before:i-daikin-error",
|
|
53
|
+
"before:text-ddt-color-common-danger-default"
|
|
54
|
+
],
|
|
55
|
+
warning: [
|
|
56
|
+
"text-ddt-color-common-text-primary",
|
|
57
|
+
"before:i-daikin-warning",
|
|
58
|
+
"before:text-ddt-color-common-warning"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
let DaikinStatusMessage = class extends DDSElement {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
this.size = "medium";
|
|
68
|
+
this.status = "positive";
|
|
69
|
+
this.statusMessageRole = null;
|
|
70
|
+
this.screenReaderText = null;
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return html`
|
|
74
|
+
<div
|
|
75
|
+
class=${cvaWrapper({ status: this.status, size: this.size })}
|
|
76
|
+
role=${ifDefined(this.statusMessageRole ?? void 0)}
|
|
77
|
+
>
|
|
78
|
+
${this.screenReaderText ? html`<span class="sr-only">${this.screenReaderText}</span>` : nothing}
|
|
79
|
+
<span>
|
|
80
|
+
<slot></slot>
|
|
81
|
+
</span>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
DaikinStatusMessage.styles = css`
|
|
87
|
+
${unsafeCSS(tailwindStyles)}
|
|
88
|
+
|
|
89
|
+
:host {
|
|
90
|
+
display: flex;
|
|
91
|
+
width: 100%;
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
__decorateClass([
|
|
95
|
+
property({ type: String, reflect: true })
|
|
96
|
+
], DaikinStatusMessage.prototype, "size", 2);
|
|
97
|
+
__decorateClass([
|
|
98
|
+
property({ type: String, reflect: true })
|
|
99
|
+
], DaikinStatusMessage.prototype, "status", 2);
|
|
100
|
+
__decorateClass([
|
|
101
|
+
property({ type: String, reflect: true, attribute: "status-message-role" })
|
|
102
|
+
], DaikinStatusMessage.prototype, "statusMessageRole", 2);
|
|
103
|
+
__decorateClass([
|
|
104
|
+
property({ type: String, reflect: true, attribute: "screen-reader-text" })
|
|
105
|
+
], DaikinStatusMessage.prototype, "screenReaderText", 2);
|
|
106
|
+
DaikinStatusMessage = __decorateClass([
|
|
107
|
+
ddsElement("daikin-status-message")
|
|
108
|
+
], DaikinStatusMessage);
|
|
109
|
+
export {
|
|
110
|
+
DaikinStatusMessage
|
|
111
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-status-message.js";
|
|
@@ -36,12 +36,12 @@ const cvaRow = cva(
|
|
|
36
36
|
variants: {
|
|
37
37
|
selected: {
|
|
38
38
|
false: [
|
|
39
|
-
"group-[:not([data-hover])]:
|
|
39
|
+
"group-[:not([data-hover])]:hover:bg-ddt-color-common-surface-hover",
|
|
40
40
|
"data-[hover]:bg-ddt-color-common-surface-hover"
|
|
41
41
|
],
|
|
42
42
|
true: [
|
|
43
43
|
"bg-ddt-color-common-surface-selected-default",
|
|
44
|
-
"group-[:not([data-hover])]:
|
|
44
|
+
"group-[:not([data-hover])]:hover:bg-ddt-color-common-surface-selected-hover",
|
|
45
45
|
"data-[hover]:bg-ddt-color-common-surface-selected-hover"
|
|
46
46
|
]
|
|
47
47
|
}
|
|
@@ -50,7 +50,10 @@ export declare class DaikinToastNotification extends DDSElement {
|
|
|
50
50
|
*/
|
|
51
51
|
closable: boolean;
|
|
52
52
|
/**
|
|
53
|
-
* The timestamp to display.
|
|
53
|
+
* The timestamp to display. Accepts a Date object and displays it in YYYY/MM/DD format.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* element.timestamp = new Date();
|
|
54
57
|
*/
|
|
55
58
|
timestamp: Date | null;
|
|
56
59
|
/**
|
|
@@ -38,8 +38,9 @@ export declare class DaikinTree extends DDSElement {
|
|
|
38
38
|
*/
|
|
39
39
|
selectable: boolean;
|
|
40
40
|
/**
|
|
41
|
-
* The
|
|
41
|
+
* The values of the currently selected tree sections or items.
|
|
42
42
|
* Even if `selectable` is `false`, you can still set this property yourself.
|
|
43
|
+
* See the `value` property of the `daikin-tree-section` and `daikin-tree-item` components.
|
|
43
44
|
*/
|
|
44
45
|
selectedItems: string[];
|
|
45
46
|
private readonly _children;
|
|
@@ -33,7 +33,9 @@ export declare const cvaTreeChildren: (props?: ({
|
|
|
33
33
|
export declare class DaikinTreeItem extends DDSElement {
|
|
34
34
|
static readonly styles: import('lit').CSSResult;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* An unique value within the tree.
|
|
37
|
+
* This value is used by the `daikin-tree` component to manage the selection target.
|
|
38
|
+
* While not required, you can use a value based on the hierarchy to ensure uniqueness. (For example, if the parent is "foo", use "foo.bar".)
|
|
37
39
|
*/
|
|
38
40
|
value: string;
|
|
39
41
|
/**
|
|
@@ -43,6 +45,9 @@ export declare class DaikinTreeItem extends DDSElement {
|
|
|
43
45
|
/**
|
|
44
46
|
* Whether the tree item is selected.
|
|
45
47
|
* Controlled by `daikin-tree`.
|
|
48
|
+
* Do not specify this manually, as it will be overwritten by the `daikin-tree` component.
|
|
49
|
+
*
|
|
50
|
+
* @private
|
|
46
51
|
*/
|
|
47
52
|
selected: boolean;
|
|
48
53
|
/**
|
|
@@ -36,7 +36,9 @@ import { DDSElement } from "../../base/index.js";
|
|
|
36
36
|
export declare class DaikinTreeSection extends DDSElement {
|
|
37
37
|
static readonly styles: import('lit').CSSResult;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* An unique value within the tree.
|
|
40
|
+
* This value is used by the `daikin-tree` component to manage the selection target.
|
|
41
|
+
* While not required, you can use a value based on the hierarchy to ensure uniqueness. (For example, if the parent is "foo", use "foo.bar".)
|
|
40
42
|
*/
|
|
41
43
|
value: string;
|
|
42
44
|
/**
|
|
@@ -46,6 +48,9 @@ export declare class DaikinTreeSection extends DDSElement {
|
|
|
46
48
|
/**
|
|
47
49
|
* Whether the tree item is selected.
|
|
48
50
|
* Controlled by `daikin-tree`.
|
|
51
|
+
* Do not specify this manually, as it will be overwritten by the `daikin-tree` component.
|
|
52
|
+
*
|
|
53
|
+
* @private
|
|
49
54
|
*/
|
|
50
55
|
selected: boolean;
|
|
51
56
|
/**
|
package/dist/es-dev/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DaikinAccordion } from "./components/accordion/daikin-accordion.js";
|
|
2
2
|
import { DaikinAccordionItem } from "./components/accordion-item/daikin-accordion-item.js";
|
|
3
3
|
import { DaikinAvatar } from "./components/avatar/daikin-avatar.js";
|
|
4
|
+
import { DaikinBadge } from "./components/badge/daikin-badge.js";
|
|
4
5
|
import { DaikinBreadcrumb } from "./components/breadcrumb/daikin-breadcrumb.js";
|
|
5
6
|
import { DaikinBreadcrumbItem } from "./components/breadcrumb-item/daikin-breadcrumb-item.js";
|
|
6
7
|
import { DaikinButton } from "./components/button/daikin-button.js";
|
|
@@ -38,6 +39,7 @@ import { DaikinRadio } from "./components/radio/daikin-radio.js";
|
|
|
38
39
|
import { DaikinRadioGroup } from "./components/radio-group/daikin-radio-group.js";
|
|
39
40
|
import { DaikinSelect } from "./components/select/daikin-select.js";
|
|
40
41
|
import { DaikinSlider } from "./components/slider/daikin-slider.js";
|
|
42
|
+
import { DaikinStatusMessage } from "./components/status-message/daikin-status-message.js";
|
|
41
43
|
import { DaikinTab } from "./components/tab/daikin-tab.js";
|
|
42
44
|
import { DaikinTabPanels } from "./components/tab-panels/daikin-tab-panels.js";
|
|
43
45
|
import { DaikinTable } from "./components/table/daikin-table.js";
|
|
@@ -60,6 +62,7 @@ export {
|
|
|
60
62
|
DaikinAccordion,
|
|
61
63
|
DaikinAccordionItem,
|
|
62
64
|
DaikinAvatar,
|
|
65
|
+
DaikinBadge,
|
|
63
66
|
DaikinBreadcrumb,
|
|
64
67
|
DaikinBreadcrumbItem,
|
|
65
68
|
DaikinButton,
|
|
@@ -97,6 +100,7 @@ export {
|
|
|
97
100
|
DaikinRadioGroup,
|
|
98
101
|
DaikinSelect,
|
|
99
102
|
DaikinSlider,
|
|
103
|
+
DaikinStatusMessage,
|
|
100
104
|
DaikinTab,
|
|
101
105
|
DaikinTabPanels,
|
|
102
106
|
DaikinTable,
|