@daikin-oss/design-system-web-components 1.5.1 → 1.5.2-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 +45 -0
- package/custom-elements.json +449 -136
- package/dist/cjs/base/dds-element.cjs +1 -1
- package/dist/cjs/components/accordion/daikin-accordion.cjs +29 -11
- package/dist/cjs/components/accordion/daikin-accordion.d.cts +1 -6
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +6 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +12 -1
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +7 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +12 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +6 -0
- package/dist/cjs/components/button/daikin-button.cjs +51 -4
- package/dist/cjs/components/card/daikin-card.cjs +2 -3
- package/dist/cjs/components/card-header/daikin-card-header.cjs +4 -2
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +12 -1
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +6 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +8 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +5 -0
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +39 -3
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +1 -0
- package/dist/cjs/components/link/daikin-link.cjs +12 -0
- package/dist/cjs/components/link/daikin-link.d.cts +6 -0
- package/dist/cjs/components/menu/daikin-menu.cjs +11 -2
- package/dist/cjs/components/menu/daikin-menu.d.cts +11 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +3 -2
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
- package/dist/cjs/components/radio/daikin-radio.cjs +1 -1
- package/dist/cjs/components/slider/daikin-slider.cjs +8 -0
- package/dist/cjs/components/slider/daikin-slider.d.cts +5 -0
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +19 -3
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +7 -0
- package/dist/cjs/components/text-area/daikin-text-area.cjs +11 -0
- package/dist/cjs/components/text-area/daikin-text-area.d.cts +6 -0
- package/dist/cjs/components/text-field/daikin-text-field.cjs +11 -0
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +6 -0
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +8 -0
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +5 -0
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +8 -0
- package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +5 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +11 -0
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +6 -0
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +1 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/base/dds-element.cjs +1 -1
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +29 -11
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.cts +1 -6
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +6 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +12 -1
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +7 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +12 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +6 -0
- package/dist/cjs-dev/components/button/daikin-button.cjs +51 -4
- package/dist/cjs-dev/components/card/daikin-card.cjs +2 -3
- package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +4 -2
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +12 -1
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +6 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +8 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +5 -0
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +39 -3
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +1 -0
- package/dist/cjs-dev/components/link/daikin-link.cjs +12 -0
- package/dist/cjs-dev/components/link/daikin-link.d.cts +6 -0
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +11 -2
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +11 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +3 -2
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +1 -1
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +8 -0
- package/dist/cjs-dev/components/slider/daikin-slider.d.cts +5 -0
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +19 -3
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +7 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +11 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +6 -0
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +11 -0
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +6 -0
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +8 -0
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +5 -0
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +8 -0
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +5 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +11 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +6 -0
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +1 -0
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/es/base/dds-element.js +1 -1
- package/dist/es/components/accordion/daikin-accordion.d.ts +1 -6
- package/dist/es/components/accordion/daikin-accordion.js +29 -11
- package/dist/es/components/accordion-item/daikin-accordion-item.js +6 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +7 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +12 -1
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +6 -0
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +12 -0
- package/dist/es/components/button/daikin-button.js +51 -4
- package/dist/es/components/card/daikin-card.js +2 -3
- package/dist/es/components/card-header/daikin-card-header.js +4 -2
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +6 -0
- package/dist/es/components/checkbox/daikin-checkbox.js +12 -1
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +5 -0
- package/dist/es/components/date-picker/daikin-date-picker.js +8 -0
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +1 -0
- package/dist/es/components/icon-button/daikin-icon-button.js +39 -3
- package/dist/es/components/link/daikin-link.d.ts +6 -0
- package/dist/es/components/link/daikin-link.js +12 -0
- package/dist/es/components/menu/daikin-menu.d.ts +11 -0
- package/dist/es/components/menu/daikin-menu.js +12 -3
- package/dist/es/components/progress-bar/daikin-progress-bar.js +3 -2
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +1 -1
- package/dist/es/components/radio/daikin-radio.js +1 -1
- package/dist/es/components/slider/daikin-slider.d.ts +5 -0
- package/dist/es/components/slider/daikin-slider.js +8 -0
- package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +7 -0
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +19 -3
- package/dist/es/components/text-area/daikin-text-area.d.ts +6 -0
- package/dist/es/components/text-area/daikin-text-area.js +11 -0
- package/dist/es/components/text-field/daikin-text-field.d.ts +6 -0
- package/dist/es/components/text-field/daikin-text-field.js +11 -0
- package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +5 -0
- package/dist/es/components/text-masked-field/daikin-text-masked-field.js +8 -0
- package/dist/es/components/time-picker/daikin-time-picker.d.ts +5 -0
- package/dist/es/components/time-picker/daikin-time-picker.js +8 -0
- package/dist/es/components/toggle/daikin-toggle.d.ts +6 -0
- package/dist/es/components/toggle/daikin-toggle.js +11 -0
- package/dist/es/components/tree-item/daikin-tree-item.js +1 -0
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es-dev/base/dds-element.js +1 -1
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +1 -6
- package/dist/es-dev/components/accordion/daikin-accordion.js +29 -11
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +6 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +7 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +12 -1
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +6 -0
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +12 -0
- package/dist/es-dev/components/button/daikin-button.js +51 -4
- package/dist/es-dev/components/card/daikin-card.js +2 -3
- package/dist/es-dev/components/card-header/daikin-card-header.js +4 -2
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +6 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +12 -1
- 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 +8 -0
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +1 -0
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +39 -3
- package/dist/es-dev/components/link/daikin-link.d.ts +6 -0
- package/dist/es-dev/components/link/daikin-link.js +12 -0
- package/dist/es-dev/components/menu/daikin-menu.d.ts +11 -0
- package/dist/es-dev/components/menu/daikin-menu.js +12 -3
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +3 -2
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +1 -1
- package/dist/es-dev/components/radio/daikin-radio.js +1 -1
- package/dist/es-dev/components/slider/daikin-slider.d.ts +5 -0
- package/dist/es-dev/components/slider/daikin-slider.js +8 -0
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +7 -0
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +19 -3
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +6 -0
- package/dist/es-dev/components/text-area/daikin-text-area.js +11 -0
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +6 -0
- package/dist/es-dev/components/text-field/daikin-text-field.js +11 -0
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +5 -0
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +8 -0
- package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +5 -0
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +8 -0
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +6 -0
- package/dist/es-dev/components/toggle/daikin-toggle.js +11 -0
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -0
- package/dist/es-dev/tailwind.css.js +1 -1
- package/package.json +1 -1
|
@@ -55,6 +55,13 @@ export declare class DaikinTableHeaderCell extends DDSElement {
|
|
|
55
55
|
* Controlled by `daikin-table` component.
|
|
56
56
|
*/
|
|
57
57
|
order: TableHeaderCellVariantProps["order"] | null;
|
|
58
|
+
private readonly _focusableRef;
|
|
59
|
+
/**
|
|
60
|
+
* Focuses on the inner button.
|
|
61
|
+
* Only effective when `sortable` is `true`.
|
|
62
|
+
* @param options focus options
|
|
63
|
+
*/
|
|
64
|
+
focus(options?: FocusOptions): void;
|
|
58
65
|
render(): import('lit-html').TemplateResult<1>;
|
|
59
66
|
}
|
|
60
67
|
declare global {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { unsafeCSS, css, html } from "lit";
|
|
3
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
3
4
|
import { DDSElement } from "../../base/dds-element.js";
|
|
4
5
|
import "../../base/dds-form-element.js";
|
|
5
6
|
import { property, oneOf } from "../../base/dds-property.js";
|
|
@@ -24,9 +25,10 @@ const cvaHeaderCell = cva(
|
|
|
24
25
|
"size-full",
|
|
25
26
|
"min-h-12",
|
|
26
27
|
"px-4",
|
|
27
|
-
"py-
|
|
28
|
+
"py-2",
|
|
28
29
|
"text-ddt-color-common-text-primary",
|
|
29
|
-
"font-bold"
|
|
30
|
+
"font-bold",
|
|
31
|
+
"natural-break"
|
|
30
32
|
],
|
|
31
33
|
{
|
|
32
34
|
variants: {
|
|
@@ -77,6 +79,16 @@ let DaikinTableHeaderCell = class extends DDSElement {
|
|
|
77
79
|
super(...arguments);
|
|
78
80
|
this.sortable = false;
|
|
79
81
|
this.order = null;
|
|
82
|
+
this._focusableRef = createRef();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Focuses on the inner button.
|
|
86
|
+
* Only effective when `sortable` is `true`.
|
|
87
|
+
* @param options focus options
|
|
88
|
+
*/
|
|
89
|
+
focus(options) {
|
|
90
|
+
var _a;
|
|
91
|
+
(_a = this._focusableRef.value) == null ? void 0 : _a.focus(options);
|
|
80
92
|
}
|
|
81
93
|
render() {
|
|
82
94
|
const headerCellCN = cvaHeaderCell({
|
|
@@ -84,9 +96,13 @@ let DaikinTableHeaderCell = class extends DDSElement {
|
|
|
84
96
|
sortable: this.sortable,
|
|
85
97
|
order: this.order === "asc" || this.order === "desc" ? this.order : null
|
|
86
98
|
});
|
|
87
|
-
const content = html`<slot
|
|
99
|
+
const content = html`<slot
|
|
100
|
+
name="left-icon"
|
|
101
|
+
class="flex-none slotted:flex-none icon-size-6"
|
|
102
|
+
></slot
|
|
88
103
|
><slot></slot>`;
|
|
89
104
|
return this.sortable ? html`<button
|
|
105
|
+
${ref(this._focusableRef)}
|
|
90
106
|
type="button"
|
|
91
107
|
class=${headerCellCN}
|
|
92
108
|
@click=${() => this.dispatchEvent(new Event("change-sort", { bubbles: true }))}
|
|
@@ -66,9 +66,15 @@ export declare class DaikinTextArea extends DDSFormElement {
|
|
|
66
66
|
* Set automatically by `reflectInputGroup` method.
|
|
67
67
|
*/
|
|
68
68
|
private _label;
|
|
69
|
+
private readonly _textareaRef;
|
|
69
70
|
get count(): number;
|
|
70
71
|
private _updateValue;
|
|
71
72
|
private _handleInput;
|
|
73
|
+
/**
|
|
74
|
+
* Focuses on the inner textarea.
|
|
75
|
+
* @param options focus options
|
|
76
|
+
*/
|
|
77
|
+
focus(options?: FocusOptions): void;
|
|
72
78
|
render(): import('lit-html').TemplateResult<1>;
|
|
73
79
|
updated(changedProperties: PropertyValues<this>): void;
|
|
74
80
|
/**
|
|
@@ -2,6 +2,7 @@ import { cva } from "class-variance-authority";
|
|
|
2
2
|
import { unsafeCSS, css, html } from "lit";
|
|
3
3
|
import { state } from "lit/decorators.js";
|
|
4
4
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
6
|
import "../../base/dds-element.js";
|
|
6
7
|
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
7
8
|
import { property } from "../../base/dds-property.js";
|
|
@@ -76,6 +77,7 @@ let DaikinTextArea = class extends DDSFormElement {
|
|
|
76
77
|
this.error = false;
|
|
77
78
|
this.resizable = false;
|
|
78
79
|
this._label = null;
|
|
80
|
+
this._textareaRef = createRef();
|
|
79
81
|
}
|
|
80
82
|
get count() {
|
|
81
83
|
return this.value.length;
|
|
@@ -87,8 +89,17 @@ let DaikinTextArea = class extends DDSFormElement {
|
|
|
87
89
|
this.value = e.target.value;
|
|
88
90
|
this._updateValue(this.value);
|
|
89
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Focuses on the inner textarea.
|
|
94
|
+
* @param options focus options
|
|
95
|
+
*/
|
|
96
|
+
focus(options) {
|
|
97
|
+
var _a;
|
|
98
|
+
(_a = this._textareaRef.value) == null ? void 0 : _a.focus(options);
|
|
99
|
+
}
|
|
90
100
|
render() {
|
|
91
101
|
return html`<textarea
|
|
102
|
+
${ref(this._textareaRef)}
|
|
92
103
|
class=${cvaTextArea({
|
|
93
104
|
error: !this.disabled && this.error,
|
|
94
105
|
resize: this.resizable
|
|
@@ -124,6 +124,12 @@ export declare class DaikinTextField extends DDSFormElement {
|
|
|
124
124
|
private _label;
|
|
125
125
|
private _hasLeftSlot;
|
|
126
126
|
private _hasRightSlot;
|
|
127
|
+
private readonly _inputRef;
|
|
128
|
+
/**
|
|
129
|
+
* Focuses on the inner input.
|
|
130
|
+
* @param options focus options
|
|
131
|
+
*/
|
|
132
|
+
focus(options?: FocusOptions): void;
|
|
127
133
|
private _handleChange;
|
|
128
134
|
private _handleSlotChange;
|
|
129
135
|
private _handleInput;
|
|
@@ -2,6 +2,7 @@ import { cva } from "class-variance-authority";
|
|
|
2
2
|
import { unsafeCSS, css, html, nothing } from "lit";
|
|
3
3
|
import { state } from "lit/decorators.js";
|
|
4
4
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
6
|
import "../../base/dds-element.js";
|
|
6
7
|
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
7
8
|
import { property } from "../../base/dds-property.js";
|
|
@@ -141,6 +142,15 @@ let DaikinTextField = class extends DDSFormElement {
|
|
|
141
142
|
this._label = null;
|
|
142
143
|
this._hasLeftSlot = false;
|
|
143
144
|
this._hasRightSlot = false;
|
|
145
|
+
this._inputRef = createRef();
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Focuses on the inner input.
|
|
149
|
+
* @param options focus options
|
|
150
|
+
*/
|
|
151
|
+
focus(options) {
|
|
152
|
+
var _a;
|
|
153
|
+
(_a = this._inputRef.value) == null ? void 0 : _a.focus(options);
|
|
144
154
|
}
|
|
145
155
|
_handleChange(event) {
|
|
146
156
|
this.dispatchEvent(new Event("change", event));
|
|
@@ -327,6 +337,7 @@ let DaikinTextField = class extends DDSFormElement {
|
|
|
327
337
|
const role = this.type === "number" ? "spinbutton" : void 0;
|
|
328
338
|
const inputMode = this.type === "number" ? "numeric" : void 0;
|
|
329
339
|
return html`<input
|
|
340
|
+
${ref(this._inputRef)}
|
|
330
341
|
class=${cvaInput({
|
|
331
342
|
error,
|
|
332
343
|
leftIcon: this._hasLeftSlot,
|
|
@@ -127,6 +127,11 @@ export declare class DaikinTextMaskedField extends DDSFormElement {
|
|
|
127
127
|
private _handleChange;
|
|
128
128
|
private _handleSlotChange;
|
|
129
129
|
private _handleInput;
|
|
130
|
+
/**
|
|
131
|
+
* Focuses on the inner input.
|
|
132
|
+
* @param options focus options
|
|
133
|
+
*/
|
|
134
|
+
focus(options?: FocusOptions): void;
|
|
130
135
|
private _createIcon;
|
|
131
136
|
render(): TemplateResult<1>;
|
|
132
137
|
updated(changedProperties: PropertyValues<this>): void;
|
|
@@ -165,6 +165,14 @@ let DaikinTextMaskedField = class extends DDSFormElement {
|
|
|
165
165
|
_handleInput(event) {
|
|
166
166
|
this.value = event.target.value;
|
|
167
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Focuses on the inner input.
|
|
170
|
+
* @param options focus options
|
|
171
|
+
*/
|
|
172
|
+
focus(options) {
|
|
173
|
+
var _a;
|
|
174
|
+
(_a = this._inputRef.value) == null ? void 0 : _a.focus(options);
|
|
175
|
+
}
|
|
168
176
|
_createIcon() {
|
|
169
177
|
return html`<span
|
|
170
178
|
class=${cvaIcon({
|
|
@@ -170,6 +170,11 @@ export declare class DaikinTimePicker extends DDSFormElement {
|
|
|
170
170
|
private _updateInputSelection;
|
|
171
171
|
private _updateSelection;
|
|
172
172
|
private _handleDropdownChange;
|
|
173
|
+
/**
|
|
174
|
+
* Focuses on the inner time input.
|
|
175
|
+
* @param options focus options
|
|
176
|
+
*/
|
|
177
|
+
focus(options?: FocusOptions): void;
|
|
173
178
|
render(): import('lit-html').TemplateResult<1>;
|
|
174
179
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
175
180
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
@@ -473,6 +473,14 @@ let DaikinTimePicker = class extends DDSFormElement {
|
|
|
473
473
|
this._updateValue();
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Focuses on the inner time input.
|
|
478
|
+
* @param options focus options
|
|
479
|
+
*/
|
|
480
|
+
focus(options) {
|
|
481
|
+
var _a;
|
|
482
|
+
(_a = this._timeInputElement.value) == null ? void 0 : _a.focus(options);
|
|
483
|
+
}
|
|
476
484
|
render() {
|
|
477
485
|
return html`<div
|
|
478
486
|
role="group"
|
|
@@ -35,6 +35,12 @@ export declare class DaikinToggle extends DDSFormElement {
|
|
|
35
35
|
* Specify the toggle switch disabled state.
|
|
36
36
|
*/
|
|
37
37
|
disabled: boolean;
|
|
38
|
+
private readonly _inputRef;
|
|
39
|
+
/**
|
|
40
|
+
* Focuses on the inner input.
|
|
41
|
+
* @param options focus options
|
|
42
|
+
*/
|
|
43
|
+
focus(options?: FocusOptions): void;
|
|
38
44
|
private _updateFormValue;
|
|
39
45
|
private _handleChange;
|
|
40
46
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { unsafeCSS, css, html } from "lit";
|
|
3
3
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
4
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
4
5
|
import "../../base/dds-element.js";
|
|
5
6
|
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
6
7
|
import { property } from "../../base/dds-property.js";
|
|
@@ -56,6 +57,15 @@ let DaikinToggle = class extends DDSFormElement {
|
|
|
56
57
|
super(...arguments);
|
|
57
58
|
this.checked = false;
|
|
58
59
|
this.disabled = false;
|
|
60
|
+
this._inputRef = createRef();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Focuses on the inner input.
|
|
64
|
+
* @param options focus options
|
|
65
|
+
*/
|
|
66
|
+
focus(options) {
|
|
67
|
+
var _a;
|
|
68
|
+
(_a = this._inputRef.value) == null ? void 0 : _a.focus(options);
|
|
59
69
|
}
|
|
60
70
|
_updateFormValue() {
|
|
61
71
|
this.setFormValue(this.checked ? this.value : null);
|
|
@@ -67,6 +77,7 @@ let DaikinToggle = class extends DDSFormElement {
|
|
|
67
77
|
}
|
|
68
78
|
render() {
|
|
69
79
|
return html`<input
|
|
80
|
+
${ref(this._inputRef)}
|
|
70
81
|
class=${TOGGLE_CLASS_NAME}
|
|
71
82
|
type="checkbox"
|
|
72
83
|
name=${ifDefined(this.getBackingProperty("name"))}
|