@visitwonders/assembly 0.16.1 → 0.18.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/declarations/action/button-group.d.ts +5 -8
- package/declarations/action/button-group.d.ts.map +1 -1
- package/declarations/data/pagination.d.ts +3 -5
- package/declarations/data/pagination.d.ts.map +1 -1
- package/declarations/data/table.d.ts +12 -11
- package/declarations/data/table.d.ts.map +1 -1
- package/declarations/form/calendar.d.ts +19 -12
- package/declarations/form/calendar.d.ts.map +1 -1
- package/declarations/form/checkbox-group.d.ts +2 -8
- package/declarations/form/checkbox-group.d.ts.map +1 -1
- package/declarations/form/checkbox.d.ts +4 -8
- package/declarations/form/checkbox.d.ts.map +1 -1
- package/declarations/form/combobox-field.d.ts +1 -1
- package/declarations/form/combobox-field.d.ts.map +1 -1
- package/declarations/form/combobox.d.ts +1 -1
- package/declarations/form/combobox.d.ts.map +1 -1
- package/declarations/form/date-picker-field.d.ts +4 -3
- package/declarations/form/date-picker-field.d.ts.map +1 -1
- package/declarations/form/date-picker.d.ts +11 -8
- package/declarations/form/date-picker.d.ts.map +1 -1
- package/declarations/form/date-range-picker-field.d.ts +4 -3
- package/declarations/form/date-range-picker-field.d.ts.map +1 -1
- package/declarations/form/date-range-picker.d.ts +6 -9
- package/declarations/form/date-range-picker.d.ts.map +1 -1
- package/declarations/form/input.d.ts +1 -4
- package/declarations/form/input.d.ts.map +1 -1
- package/declarations/form/money-field.d.ts +13 -3
- package/declarations/form/money-field.d.ts.map +1 -1
- package/declarations/form/multi-combobox-field.d.ts +1 -1
- package/declarations/form/multi-combobox-field.d.ts.map +1 -1
- package/declarations/form/multi-combobox.d.ts +1 -1
- package/declarations/form/multi-combobox.d.ts.map +1 -1
- package/declarations/form/radio.d.ts +3 -5
- package/declarations/form/radio.d.ts.map +1 -1
- package/declarations/form/search-input.d.ts +2 -1
- package/declarations/form/search-input.d.ts.map +1 -1
- package/declarations/form/text-field.d.ts +1 -7
- package/declarations/form/text-field.d.ts.map +1 -1
- package/declarations/form/textarea.d.ts +1 -7
- package/declarations/form/textarea.d.ts.map +1 -1
- package/declarations/form/toggle-field.d.ts +2 -4
- package/declarations/form/toggle-field.d.ts.map +1 -1
- package/declarations/form/toggle.d.ts +3 -9
- package/declarations/form/toggle.d.ts.map +1 -1
- package/declarations/overlay/drawer.d.ts +10 -9
- package/declarations/overlay/drawer.d.ts.map +1 -1
- package/declarations/overlay/modal.d.ts +10 -10
- package/declarations/overlay/modal.d.ts.map +1 -1
- package/declarations/overlay/popover.d.ts +9 -8
- package/declarations/overlay/popover.d.ts.map +1 -1
- package/declarations/overlay/tooltip.d.ts +9 -8
- package/declarations/overlay/tooltip.d.ts.map +1 -1
- package/dist/action/button-group.js +2 -25
- package/dist/data/pagination.js +10 -24
- package/dist/data/table.css +51 -3
- package/dist/data/table.js +14 -71
- package/dist/form/calendar.js +29 -57
- package/dist/form/checkbox-group.js +3 -23
- package/dist/form/checkbox.js +3 -17
- package/dist/form/combobox-field.js.map +1 -1
- package/dist/form/date-picker-field.js +1 -1
- package/dist/form/date-picker-field.js.map +1 -1
- package/dist/form/date-picker.js +10 -28
- package/dist/form/date-range-picker-field.js +1 -1
- package/dist/form/date-range-picker-field.js.map +1 -1
- package/dist/form/date-range-picker.js +8 -31
- package/dist/form/input.js +1 -6
- package/dist/form/money-field.js +23 -22
- package/dist/form/multi-combobox-field.js.map +1 -1
- package/dist/form/radio.js +3 -4
- package/dist/form/search-input.js +6 -9
- package/dist/form/text-field.js +3 -22
- package/dist/form/textarea.js +2 -17
- package/dist/form/toggle-field.js +1 -1
- package/dist/form/toggle.js +4 -18
- package/dist/overlay/drawer.js +6 -26
- package/dist/overlay/modal.js +5 -29
- package/dist/overlay/popover.js +15 -16
- package/dist/overlay/tooltip.js +14 -16
- package/package.json +16 -17
package/dist/overlay/drawer.js
CHANGED
|
@@ -72,12 +72,6 @@ class DrawerClose extends Component {
|
|
|
72
72
|
// Main Component
|
|
73
73
|
// ============================================================================
|
|
74
74
|
class Drawer extends Component {
|
|
75
|
-
static {
|
|
76
|
-
g(this.prototype, "_isOpenInternal", [tracked], function () {
|
|
77
|
-
return undefined;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
#_isOpenInternal = (i(this, "_isOpenInternal"), void 0);
|
|
81
75
|
static {
|
|
82
76
|
g(this.prototype, "exitAnimationActive", [tracked], function () {
|
|
83
77
|
return false;
|
|
@@ -92,20 +86,8 @@ class Drawer extends Component {
|
|
|
92
86
|
// ============================================================================
|
|
93
87
|
// Getters
|
|
94
88
|
// ============================================================================
|
|
95
|
-
get isOpenInternal() {
|
|
96
|
-
if (this._isOpenInternal === undefined) {
|
|
97
|
-
return this.args.defaultOpen ?? false;
|
|
98
|
-
}
|
|
99
|
-
return this._isOpenInternal;
|
|
100
|
-
}
|
|
101
|
-
set isOpenInternal(value) {
|
|
102
|
-
this._isOpenInternal = value;
|
|
103
|
-
}
|
|
104
|
-
get isControlled() {
|
|
105
|
-
return this.args.open !== undefined;
|
|
106
|
-
}
|
|
107
89
|
get isOpen() {
|
|
108
|
-
return this.
|
|
90
|
+
return this.args.open ?? false;
|
|
109
91
|
}
|
|
110
92
|
get side() {
|
|
111
93
|
return this.args.side ?? 'right';
|
|
@@ -139,12 +121,10 @@ class Drawer extends Component {
|
|
|
139
121
|
// ============================================================================
|
|
140
122
|
// Actions
|
|
141
123
|
// ============================================================================
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.args.onOpenChange?.(value);
|
|
147
|
-
};
|
|
124
|
+
// Requests a close and resolves once the slide-out animation has ended.
|
|
125
|
+
// The drawer holds no open state of its own — it fires the callback and
|
|
126
|
+
// the consumer sets `@open` to false. The returned promise is local
|
|
127
|
+
// teardown mechanics, awaited by consumers sequencing post-close work.
|
|
148
128
|
closeDrawer = () => {
|
|
149
129
|
if (!this.isOpen && !this.exitAnimationActive) {
|
|
150
130
|
return Promise.resolve();
|
|
@@ -152,7 +132,7 @@ class Drawer extends Component {
|
|
|
152
132
|
const promise = new Promise(resolve => {
|
|
153
133
|
this.pendingCloseResolvers.push(resolve);
|
|
154
134
|
});
|
|
155
|
-
this.
|
|
135
|
+
this.args.onOpenChange?.(false);
|
|
156
136
|
return promise;
|
|
157
137
|
};
|
|
158
138
|
drainCloseResolvers() {
|
package/dist/overlay/modal.js
CHANGED
|
@@ -72,12 +72,6 @@ class ModalClose extends Component {
|
|
|
72
72
|
// Main Component
|
|
73
73
|
// ============================================================================
|
|
74
74
|
class Modal extends Component {
|
|
75
|
-
static {
|
|
76
|
-
g(this.prototype, "_isOpenInternal", [tracked], function () {
|
|
77
|
-
return undefined;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
#_isOpenInternal = (i(this, "_isOpenInternal"), void 0);
|
|
81
75
|
static {
|
|
82
76
|
g(this.prototype, "exitAnimationActive", [tracked], function () {
|
|
83
77
|
return false;
|
|
@@ -91,20 +85,8 @@ class Modal extends Component {
|
|
|
91
85
|
// ============================================================================
|
|
92
86
|
// Getters
|
|
93
87
|
// ============================================================================
|
|
94
|
-
get isOpenInternal() {
|
|
95
|
-
if (this._isOpenInternal === undefined) {
|
|
96
|
-
return this.args.defaultOpen ?? false;
|
|
97
|
-
}
|
|
98
|
-
return this._isOpenInternal;
|
|
99
|
-
}
|
|
100
|
-
set isOpenInternal(value) {
|
|
101
|
-
this._isOpenInternal = value;
|
|
102
|
-
}
|
|
103
|
-
get isControlled() {
|
|
104
|
-
return this.args.open !== undefined;
|
|
105
|
-
}
|
|
106
88
|
get isOpen() {
|
|
107
|
-
return this.
|
|
89
|
+
return this.args.open ?? false;
|
|
108
90
|
}
|
|
109
91
|
get size() {
|
|
110
92
|
return this.args.size ?? 'md';
|
|
@@ -132,17 +114,11 @@ class Modal extends Component {
|
|
|
132
114
|
// ============================================================================
|
|
133
115
|
// Actions
|
|
134
116
|
// ============================================================================
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
this.args.onOpenChange?.(value);
|
|
140
|
-
};
|
|
141
|
-
openModal = () => {
|
|
142
|
-
this.setOpen(true);
|
|
143
|
-
};
|
|
117
|
+
// Internal close triggers (Esc, backdrop, close buttons) request a close
|
|
118
|
+
// by firing the callback. The modal holds no open state of its own — the
|
|
119
|
+
// consumer sets `@open` to false in response.
|
|
144
120
|
closeModal = () => {
|
|
145
|
-
this.
|
|
121
|
+
this.args.onOpenChange?.(false);
|
|
146
122
|
};
|
|
147
123
|
handleBackdropClose = () => {
|
|
148
124
|
if (this.closeOnBackdropClick) {
|
package/dist/overlay/popover.js
CHANGED
|
@@ -245,11 +245,14 @@ class PopoverClose extends Component {
|
|
|
245
245
|
// ============================================================================
|
|
246
246
|
class Popover extends Component {
|
|
247
247
|
static {
|
|
248
|
-
g(this.prototype, "
|
|
249
|
-
return
|
|
248
|
+
g(this.prototype, "_isOpen", [tracked], function () {
|
|
249
|
+
return false;
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
-
#
|
|
252
|
+
#_isOpen = (i(this, "_isOpen"), void 0); // Self-managed open state. The popover opens and closes itself on click,
|
|
253
|
+
// hover, or focus (per `@trigger`); this is the component's own UI
|
|
254
|
+
// mechanics, the ember-basic-dropdown shape. `@open`, when provided,
|
|
255
|
+
// overrides it.
|
|
253
256
|
static {
|
|
254
257
|
g(this.prototype, "triggerElement", [tracked], function () {
|
|
255
258
|
return null;
|
|
@@ -307,20 +310,13 @@ class Popover extends Component {
|
|
|
307
310
|
});
|
|
308
311
|
};
|
|
309
312
|
});
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
return this._isOpenInternal;
|
|
315
|
-
}
|
|
316
|
-
set isOpenInternal(value) {
|
|
317
|
-
this._isOpenInternal = value;
|
|
318
|
-
}
|
|
319
|
-
get isControlled() {
|
|
313
|
+
// True when the consumer is driving open via `@open`. The override wins
|
|
314
|
+
// over the self-managed `_isOpen` state.
|
|
315
|
+
get hasOpenOverride() {
|
|
320
316
|
return this.args.open !== undefined;
|
|
321
317
|
}
|
|
322
318
|
get isOpen() {
|
|
323
|
-
return this.
|
|
319
|
+
return this.args.open ?? this._isOpen;
|
|
324
320
|
}
|
|
325
321
|
get triggerMode() {
|
|
326
322
|
return this.args.trigger ?? 'click';
|
|
@@ -338,8 +334,11 @@ class Popover extends Component {
|
|
|
338
334
|
return this.args.closeDelay ?? 0;
|
|
339
335
|
}
|
|
340
336
|
setOpen = value => {
|
|
341
|
-
|
|
342
|
-
|
|
337
|
+
// Update the self-managed state unless the consumer is driving `@open`.
|
|
338
|
+
// The callback fires either way so an `@open` consumer can follow the
|
|
339
|
+
// popover's own open/close intent rather than fighting it.
|
|
340
|
+
if (!this.hasOpenOverride) {
|
|
341
|
+
this._isOpen = value;
|
|
343
342
|
}
|
|
344
343
|
this.args.onOpenChange?.(value);
|
|
345
344
|
};
|
package/dist/overlay/tooltip.js
CHANGED
|
@@ -67,11 +67,13 @@ class TooltipProvider extends Component {
|
|
|
67
67
|
*/
|
|
68
68
|
class Tooltip extends Component {
|
|
69
69
|
static {
|
|
70
|
-
g(this.prototype, "
|
|
71
|
-
return
|
|
70
|
+
g(this.prototype, "_isOpen", [tracked], function () {
|
|
71
|
+
return false;
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
#
|
|
74
|
+
#_isOpen = (i(this, "_isOpen"), void 0); // Self-managed open state. The tooltip opens and closes itself on hover and
|
|
75
|
+
// focus; this is the component's own UI mechanics, the ember-basic-dropdown
|
|
76
|
+
// shape. `@open`, when provided, overrides it.
|
|
75
77
|
static {
|
|
76
78
|
g(this.prototype, "actualSide", [tracked], function () {
|
|
77
79
|
return 'top';
|
|
@@ -92,21 +94,14 @@ class Tooltip extends Component {
|
|
|
92
94
|
// ============================================================================
|
|
93
95
|
// Getters
|
|
94
96
|
// ============================================================================
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
return this._isOpenInternal;
|
|
100
|
-
}
|
|
101
|
-
set isOpenInternal(value) {
|
|
102
|
-
this._isOpenInternal = value;
|
|
103
|
-
}
|
|
104
|
-
get isControlled() {
|
|
97
|
+
// True when the consumer is driving open via `@open`. The override wins
|
|
98
|
+
// over the self-managed `_isOpen` state.
|
|
99
|
+
get hasOpenOverride() {
|
|
105
100
|
return this.args.open !== undefined;
|
|
106
101
|
}
|
|
107
102
|
get isOpen() {
|
|
108
103
|
if (this.args.disabled) return false;
|
|
109
|
-
return this.
|
|
104
|
+
return this.args.open ?? this._isOpen;
|
|
110
105
|
}
|
|
111
106
|
get side() {
|
|
112
107
|
return this.args.side ?? 'top';
|
|
@@ -244,8 +239,11 @@ class Tooltip extends Component {
|
|
|
244
239
|
// State Management
|
|
245
240
|
// ============================================================================
|
|
246
241
|
setOpen = value => {
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
// Update the self-managed state unless the consumer is driving `@open`.
|
|
243
|
+
// The callback fires either way so an `@open` consumer can follow the
|
|
244
|
+
// tooltip's own open/close intent rather than fighting it.
|
|
245
|
+
if (!this.hasOpenOverride) {
|
|
246
|
+
this._isOpen = value;
|
|
249
247
|
}
|
|
250
248
|
this.args.onOpenChange?.(value);
|
|
251
249
|
// Track close time for skip delay behavior
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visitwonders/assembly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "The default blueprint for Embroider v2 addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -77,21 +77,6 @@
|
|
|
77
77
|
"declarations",
|
|
78
78
|
"dist"
|
|
79
79
|
],
|
|
80
|
-
"scripts": {
|
|
81
|
-
"build": "rollup --config",
|
|
82
|
-
"format": "prettier . --cache --write",
|
|
83
|
-
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
84
|
-
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" --prefixColors auto && pnpm run format",
|
|
85
|
-
"lint:format": "prettier . --cache --check",
|
|
86
|
-
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
87
|
-
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
88
|
-
"lint:js": "eslint . --cache",
|
|
89
|
-
"lint:js:fix": "eslint . --fix",
|
|
90
|
-
"lint:types": "ember-tsc",
|
|
91
|
-
"prepack": "rm -rf declarations dist && rollup --config",
|
|
92
|
-
"start": "rollup --config --watch",
|
|
93
|
-
"test": "echo 'A v2 addon does not have tests, run tests in showcase'"
|
|
94
|
-
},
|
|
95
80
|
"dependencies": {
|
|
96
81
|
"@arthur5005/dnd-kit-ember": "^0.1.2",
|
|
97
82
|
"@embroider/addon-shim": "^1.8.9",
|
|
@@ -228,5 +213,19 @@
|
|
|
228
213
|
"./typography/heading.js": "./dist/_app_/typography/heading.js",
|
|
229
214
|
"./typography/text.js": "./dist/_app_/typography/text.js"
|
|
230
215
|
}
|
|
216
|
+
},
|
|
217
|
+
"scripts": {
|
|
218
|
+
"build": "rollup --config",
|
|
219
|
+
"format": "prettier . --cache --write",
|
|
220
|
+
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
221
|
+
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" --prefixColors auto && pnpm run format",
|
|
222
|
+
"lint:format": "prettier . --cache --check",
|
|
223
|
+
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
224
|
+
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
225
|
+
"lint:js": "eslint . --cache",
|
|
226
|
+
"lint:js:fix": "eslint . --fix",
|
|
227
|
+
"lint:types": "ember-tsc",
|
|
228
|
+
"start": "rollup --config --watch",
|
|
229
|
+
"test": "echo 'A v2 addon does not have tests, run tests in showcase'"
|
|
231
230
|
}
|
|
232
|
-
}
|
|
231
|
+
}
|