@visitwonders/assembly 0.1.0 → 0.2.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 +89 -0
- package/declarations/action/button-group.d.ts.map +1 -0
- package/declarations/action/button.d.ts +4 -0
- package/declarations/action/button.d.ts.map +1 -1
- package/declarations/action/index.d.ts +1 -0
- package/declarations/action/index.d.ts.map +1 -1
- package/declarations/components/form/checkbox.d.ts +0 -65
- package/declarations/components/form/control.d.ts +0 -36
- package/declarations/components/form/error-message.d.ts +0 -22
- package/declarations/components/form/field.d.ts +0 -21
- package/declarations/components/form/form.d.ts +0 -14
- package/declarations/components/form/help-text.d.ts +0 -14
- package/declarations/components/form/index.d.ts +0 -15
- package/declarations/components/form/input.d.ts +0 -80
- package/declarations/components/form/label.d.ts +0 -34
- package/declarations/components/form/radio-group.d.ts +0 -43
- package/declarations/components/form/radio.d.ts +0 -54
- package/declarations/components/form/search-input.d.ts +0 -35
- package/declarations/components/form/select.d.ts +0 -36
- package/declarations/components/form/test.d.ts +0 -11
- package/declarations/components/form/textarea.d.ts +0 -79
- package/declarations/components/form/toggle.d.ts +0 -23
- package/declarations/components/primitives/grid-item.d.ts +0 -21
- package/declarations/components/primitives/grid.d.ts +0 -49
- package/declarations/components/primitives/h-stack.d.ts +0 -17
- package/declarations/components/primitives/heading.d.ts +0 -52
- package/declarations/components/primitives/image.d.ts +0 -24
- package/declarations/components/primitives/index.d.ts +0 -8
- package/declarations/components/primitives/link.d.ts +0 -16
- package/declarations/components/primitives/stack.d.ts +0 -23
- package/declarations/components/primitives/text.d.ts +0 -50
- package/declarations/components/primitives/v-stack.d.ts +0 -16
- package/declarations/components/ui/badge.d.ts +0 -14
- package/declarations/components/ui/button.d.ts +0 -32
- package/declarations/components/ui/card.d.ts +0 -27
- package/declarations/components/ui/description-list.d.ts +0 -22
- package/declarations/components/ui/drawer.d.ts +0 -14
- package/declarations/components/ui/icon-button.d.ts +0 -21
- package/declarations/components/ui/icon.d.ts +0 -21
- package/declarations/components/ui/index.d.ts +0 -17
- package/declarations/components/ui/modal.d.ts +0 -14
- package/declarations/components/ui/page-header.d.ts +0 -16
- package/declarations/components/ui/skeleton-card.d.ts +0 -17
- package/declarations/components/ui/skeleton-text.d.ts +0 -16
- package/declarations/components/ui/skeleton.d.ts +0 -20
- package/declarations/components/ui/spinner.d.ts +0 -11
- package/declarations/components/ui/tab-nav/index.d.ts +0 -36
- package/declarations/components/ui/table/body.d.ts +0 -11
- package/declarations/components/ui/table/caption.d.ts +0 -18
- package/declarations/components/ui/table/cell.d.ts +0 -31
- package/declarations/components/ui/table/footer.d.ts +0 -11
- package/declarations/components/ui/table/header-cell.d.ts +0 -35
- package/declarations/components/ui/table/header.d.ts +0 -11
- package/declarations/components/ui/table/row.d.ts +0 -21
- package/declarations/components/ui/table_old.d.ts +0 -29
- package/declarations/data/table.d.ts +0 -1
- package/declarations/data/table.d.ts.map +1 -1
- package/declarations/form/calendar.d.ts +0 -1
- package/declarations/form/calendar.d.ts.map +1 -1
- package/declarations/form/control.d.ts +5 -1
- package/declarations/form/control.d.ts.map +1 -1
- package/declarations/form/country-select-field.d.ts +6 -0
- package/declarations/form/country-select-field.d.ts.map +1 -1
- package/declarations/form/country-select.d.ts +0 -1
- package/declarations/form/country-select.d.ts.map +1 -1
- package/declarations/form/date-picker-field.d.ts +6 -0
- package/declarations/form/date-picker-field.d.ts.map +1 -1
- package/declarations/form/date-picker.d.ts +0 -1
- package/declarations/form/date-picker.d.ts.map +1 -1
- package/declarations/form/date-range-picker-field.d.ts +6 -0
- package/declarations/form/date-range-picker-field.d.ts.map +1 -1
- package/declarations/form/date-range-picker.d.ts +0 -1
- package/declarations/form/date-range-picker.d.ts.map +1 -1
- package/declarations/form/fieldset.d.ts +22 -0
- package/declarations/form/fieldset.d.ts.map +1 -0
- package/declarations/form/form.d.ts +0 -1
- package/declarations/form/form.d.ts.map +1 -1
- package/declarations/form/index.d.ts +1 -0
- package/declarations/form/index.d.ts.map +1 -1
- package/declarations/form/label.d.ts +4 -0
- package/declarations/form/label.d.ts.map +1 -1
- package/declarations/form/listbox.d.ts +0 -1
- package/declarations/form/listbox.d.ts.map +1 -1
- package/declarations/form/money-field.d.ts +6 -1
- package/declarations/form/money-field.d.ts.map +1 -1
- package/declarations/form/multi-select.d.ts +0 -1
- package/declarations/form/multi-select.d.ts.map +1 -1
- package/declarations/form/number-field.d.ts +9 -1
- package/declarations/form/number-field.d.ts.map +1 -1
- package/declarations/form/select-field.d.ts +4 -1
- package/declarations/form/select-field.d.ts.map +1 -1
- package/declarations/form/test.d.ts +0 -11
- package/declarations/form/text-field.d.ts +9 -0
- package/declarations/form/text-field.d.ts.map +1 -1
- package/declarations/form/time-picker-field.d.ts +6 -0
- package/declarations/form/time-picker-field.d.ts.map +1 -1
- package/declarations/form/time-picker.d.ts +0 -1
- package/declarations/form/time-picker.d.ts.map +1 -1
- package/declarations/form/toggle.d.ts +4 -0
- package/declarations/form/toggle.d.ts.map +1 -1
- package/declarations/layout/index.d.ts +1 -0
- package/declarations/layout/index.d.ts.map +1 -1
- package/declarations/layout/panel.d.ts +34 -0
- package/declarations/layout/panel.d.ts.map +1 -0
- package/declarations/media/icon.d.ts +0 -1
- package/declarations/media/icon.d.ts.map +1 -1
- package/declarations/media/image.d.ts +1 -1
- package/declarations/overlay/blanket.d.ts +0 -1
- package/declarations/overlay/blanket.d.ts.map +1 -1
- package/declarations/overlay/drawer.d.ts +4 -1
- package/declarations/overlay/drawer.d.ts.map +1 -1
- package/declarations/overlay/modal.d.ts +0 -1
- package/declarations/overlay/modal.d.ts.map +1 -1
- package/declarations/overlay/popover.d.ts +0 -1
- package/declarations/overlay/popover.d.ts.map +1 -1
- package/declarations/overlay/toast.d.ts +0 -1
- package/declarations/overlay/toast.d.ts.map +1 -1
- package/declarations/overlay/tooltip.d.ts +0 -1
- package/declarations/overlay/tooltip.d.ts.map +1 -1
- package/declarations/primitives/grid-item.d.ts +0 -21
- package/declarations/primitives/grid.d.ts +0 -49
- package/declarations/primitives/h-stack.d.ts +0 -17
- package/declarations/primitives/heading.d.ts +0 -52
- package/declarations/primitives/image.d.ts +0 -24
- package/declarations/primitives/index.d.ts +0 -4
- package/declarations/primitives/link.d.ts +0 -16
- package/declarations/primitives/stack.d.ts +0 -23
- package/declarations/primitives/text.d.ts +0 -50
- package/declarations/primitives/v-stack.d.ts +0 -16
- package/declarations/status/badge.d.ts +0 -1
- package/declarations/status/badge.d.ts.map +1 -1
- package/declarations/status/skeleton-avatar.d.ts +1 -1
- package/declarations/status/skeleton-avatar.d.ts.map +1 -1
- package/declarations/status/skeleton-button.d.ts +1 -1
- package/declarations/status/skeleton-button.d.ts.map +1 -1
- package/declarations/status/skeleton-image.d.ts +1 -1
- package/declarations/status/skeleton-image.d.ts.map +1 -1
- package/declarations/status/skeleton-text.d.ts +1 -1
- package/declarations/status/skeleton-text.d.ts.map +1 -1
- package/declarations/status/skeleton.d.ts +1 -1
- package/declarations/status/skeleton.d.ts.map +1 -1
- package/declarations/status/tag.d.ts +0 -1
- package/declarations/status/tag.d.ts.map +1 -1
- package/declarations/typography/link.d.ts +0 -16
- package/declarations/ui/button.d.ts +0 -50
- package/declarations/ui/icon.d.ts +0 -21
- package/dist/_app_/action/button-group.js +1 -0
- package/dist/_app_/form/fieldset.js +1 -0
- package/dist/_app_/layout/panel.js +1 -0
- package/dist/action/button-group.css +18 -0
- package/dist/action/button-group.js +130 -0
- package/dist/action/button-group.js.map +1 -0
- package/dist/action/button.css +152 -0
- package/dist/action/button.js +1 -1
- package/dist/action/index.js +1 -0
- package/dist/action/index.js.map +1 -1
- package/dist/data/table.css +48 -47
- package/dist/data/table.js +1 -1
- package/dist/form/checkbox.css +3 -3
- package/dist/form/control-css-02e93d930aecac651d5c69dc10a83504.css +36 -0
- package/dist/form/control.js +2 -2
- package/dist/form/country-select-field.js +1 -1
- package/dist/form/country-select-field.js.map +1 -1
- package/dist/form/country-select.css +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-range-picker-field.js +1 -1
- package/dist/form/date-range-picker-field.js.map +1 -1
- package/dist/form/field.css +3 -3
- package/dist/form/fieldset.css +65 -0
- package/dist/form/fieldset.js +20 -0
- package/dist/form/fieldset.js.map +1 -0
- package/dist/form/help-text.css +1 -1
- package/dist/form/index.js +1 -0
- package/dist/form/index.js.map +1 -1
- package/dist/form/input.css +1 -0
- package/dist/form/label.css +15 -1
- package/dist/form/label.js +10 -4
- package/dist/form/money-field.js +1 -1
- package/dist/form/multi-select.css +1 -1
- package/dist/form/number-field.css +1 -0
- package/dist/form/number-field.js +1 -1
- package/dist/form/radio.css +3 -3
- package/dist/form/select-field.js +1 -1
- package/dist/form/select-field.js.map +1 -1
- package/dist/form/select.css +1 -1
- package/dist/form/{text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css → text-field-css-754feeb82dbd9fc9afdc1f00dceb13ad.css} +22 -1
- package/dist/form/text-field.js +2 -2
- package/dist/form/textarea.css +2 -1
- package/dist/form/time-picker-field.js +1 -1
- package/dist/form/time-picker-field.js.map +1 -1
- package/dist/form/toggle.css +27 -1
- package/dist/form/toggle.js +4 -1
- package/dist/layout/{divider-css-1ba104b9c606cbd1f542b45640fb5f2b.css → divider-css-7e0cc7d350e31172582851c6cb2cf586.css} +2 -2
- package/dist/layout/divider.js +1 -1
- package/dist/layout/{grid-css-086976eb41686e3714554f56c098d3d5.css → grid-css-c8259b34d7062f44e78f0a2cc139cb44.css} +13 -13
- package/dist/layout/grid.js +1 -1
- package/dist/layout/index.js +1 -0
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/panel.css +229 -0
- package/dist/layout/panel.js +32 -0
- package/dist/layout/panel.js.map +1 -0
- package/dist/overlay/blanket.css +12 -11
- package/dist/overlay/blanket.js +1 -1
- package/dist/overlay/drawer.css +99 -62
- package/dist/overlay/drawer.js +7 -4
- package/dist/overlay/modal.css +22 -21
- package/dist/overlay/modal.js +4 -4
- package/dist/overlay/popover.css +30 -29
- package/dist/overlay/popover.js +4 -4
- package/dist/overlay/toast.css +49 -48
- package/dist/overlay/toast.js +2 -2
- package/dist/overlay/tooltip.css +38 -37
- package/dist/overlay/tooltip.js +2 -2
- package/dist/skeleton-shared-BTA5oAjw.js +3 -0
- package/dist/skeleton-shared-BTA5oAjw.js.map +1 -0
- package/dist/status/badge.css +30 -29
- package/dist/status/badge.js +1 -1
- package/dist/status/skeleton-avatar.js +1 -1
- package/dist/status/skeleton-avatar.js.map +1 -1
- package/dist/status/skeleton-button.js +1 -1
- package/dist/status/skeleton-button.js.map +1 -1
- package/dist/status/skeleton-image.js +1 -1
- package/dist/status/skeleton-image.js.map +1 -1
- package/dist/status/skeleton-text.js +1 -1
- package/dist/status/skeleton-text.js.map +1 -1
- package/dist/status/skeleton.js +1 -1
- package/dist/status/skeleton.js.map +1 -1
- package/dist/status/tag.css +50 -51
- package/dist/status/tag.js +1 -1
- package/dist/styles/base/typography.css +1 -1
- package/dist/styles/primitive/typography.css +10 -7
- package/dist/styles/semantic/typography.css +4 -4
- package/dist/styles.css +15 -12
- package/dist/typography/{heading-css-8850735eabc2efb34f15240b852c99e7.css → heading-css-726c4c3109f2b741657733e1ba103c67.css} +9 -9
- package/dist/typography/heading.js +1 -1
- package/package.json +22 -18
- package/dist/form/control-css-6c81caf37fd813b36033091d5340bc70.css +0 -20
- package/dist/skeleton-CL5Pcwrk.js +0 -3
- package/dist/skeleton-CL5Pcwrk.js.map +0 -1
- /package/dist/status/{skeleton.css → skeleton-shared.css} +0 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import "./button-group.css"
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { on } from '@ember/modifier';
|
|
6
|
+
import { fn, hash } from '@ember/helper';
|
|
7
|
+
import Button from './button.js';
|
|
8
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
9
|
+
import { setComponentTemplate } from '@ember/component';
|
|
10
|
+
import { g, i, n } from 'decorator-transforms/runtime';
|
|
11
|
+
|
|
12
|
+
;
|
|
13
|
+
|
|
14
|
+
class ButtonGroup extends Component {
|
|
15
|
+
static {
|
|
16
|
+
g(this.prototype, "internalValue", [tracked]);
|
|
17
|
+
}
|
|
18
|
+
#internalValue = (i(this, "internalValue"), void 0);
|
|
19
|
+
constructor(owner, args) {
|
|
20
|
+
super(owner, args);
|
|
21
|
+
const defaultVal = args.defaultValue;
|
|
22
|
+
if (this.selectionType === 'multiple') {
|
|
23
|
+
this.internalValue = Array.isArray(defaultVal) ? [...defaultVal] : defaultVal ? [defaultVal] : [];
|
|
24
|
+
} else {
|
|
25
|
+
this.internalValue = Array.isArray(defaultVal) ? defaultVal[0] ?? '' : defaultVal ?? '';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
get selectionType() {
|
|
29
|
+
return this.args.type ?? 'single';
|
|
30
|
+
}
|
|
31
|
+
get isControlled() {
|
|
32
|
+
return this.args.value !== undefined;
|
|
33
|
+
}
|
|
34
|
+
get selectedValue() {
|
|
35
|
+
return this.isControlled ? this.args.value ?? '' : this.internalValue;
|
|
36
|
+
}
|
|
37
|
+
get variant() {
|
|
38
|
+
return this.args.variant ?? 'outline';
|
|
39
|
+
}
|
|
40
|
+
get tone() {
|
|
41
|
+
return this.args.tone ?? 'neutral';
|
|
42
|
+
}
|
|
43
|
+
get size() {
|
|
44
|
+
return this.args.size ?? 'md';
|
|
45
|
+
}
|
|
46
|
+
get normalizedOptions() {
|
|
47
|
+
if (!this.args.options) return [];
|
|
48
|
+
return this.args.options.map(option => {
|
|
49
|
+
if (typeof option === 'string') {
|
|
50
|
+
return {
|
|
51
|
+
value: option,
|
|
52
|
+
label: option
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return option;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
isValueSelected = value => {
|
|
59
|
+
if (this.selectionType === 'multiple') {
|
|
60
|
+
const selected = this.selectedValue;
|
|
61
|
+
return Array.isArray(selected) ? selected.includes(value) : selected === value;
|
|
62
|
+
}
|
|
63
|
+
return this.selectedValue === value;
|
|
64
|
+
};
|
|
65
|
+
isFirst = index => index === 0;
|
|
66
|
+
isLast = index => index === this.normalizedOptions.length - 1;
|
|
67
|
+
handleSelect(value) {
|
|
68
|
+
if (this.selectionType === 'multiple') {
|
|
69
|
+
const current = this.selectedValue;
|
|
70
|
+
const currentArray = Array.isArray(current) ? current : [current];
|
|
71
|
+
let newValues;
|
|
72
|
+
if (currentArray.includes(value)) {
|
|
73
|
+
newValues = currentArray.filter(v => v !== value);
|
|
74
|
+
} else {
|
|
75
|
+
newValues = [...currentArray, value];
|
|
76
|
+
}
|
|
77
|
+
if (!this.isControlled) {
|
|
78
|
+
this.internalValue = newValues;
|
|
79
|
+
}
|
|
80
|
+
this.args.onChange?.(newValues);
|
|
81
|
+
} else {
|
|
82
|
+
if (this.selectedValue === value) return;
|
|
83
|
+
if (!this.isControlled) {
|
|
84
|
+
this.internalValue = value;
|
|
85
|
+
}
|
|
86
|
+
this.args.onChange?.(value);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
static {
|
|
90
|
+
n(this.prototype, "handleSelect", [action]);
|
|
91
|
+
}
|
|
92
|
+
static {
|
|
93
|
+
setComponentTemplate(precompileTemplate("<div class=\"button-group_e47b39f9a\" role=\"group\" aria-label={{@aria-label}} data-full-width={{if @isFullWidth \"true\"}} data-test-button-group ...attributes>\n {{#if (has-block)}}\n {{yield (hash Item=(component ButtonGroupItem groupVariant=this.variant groupTone=this.tone groupSize=this.size groupDisabled=@isDisabled groupFullWidth=@isFullWidth isValueSelected=this.isValueSelected onItemClick=this.handleSelect))}}\n {{else}}\n {{#each this.normalizedOptions as |option index|}}\n <Button @variant={{this.variant}} @tone={{this.tone}} @size={{this.size}} @isPressed={{this.isValueSelected option.value}} @isDisabled={{if @isDisabled true option.disabled}} @isFullWidth={{@isFullWidth}} @joinLeft={{if (this.isFirst index) false true}} @joinRight={{if (this.isLast index) false true}} {{on \"click\" (fn this.handleSelect option.value)}}>\n {{option.label}}\n </Button>\n {{/each}}\n {{/if}}\n</div>", {
|
|
94
|
+
strictMode: true,
|
|
95
|
+
scope: () => ({
|
|
96
|
+
hash,
|
|
97
|
+
ButtonGroupItem,
|
|
98
|
+
Button,
|
|
99
|
+
on,
|
|
100
|
+
fn
|
|
101
|
+
})
|
|
102
|
+
}), this);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
class ButtonGroupItem extends Component {
|
|
106
|
+
get isDisabled() {
|
|
107
|
+
return this.args.isDisabled ?? this.args.groupDisabled ?? false;
|
|
108
|
+
}
|
|
109
|
+
get isPressed() {
|
|
110
|
+
return this.args.isValueSelected(this.args.value);
|
|
111
|
+
}
|
|
112
|
+
handleClick() {
|
|
113
|
+
this.args.onItemClick(this.args.value);
|
|
114
|
+
}
|
|
115
|
+
static {
|
|
116
|
+
n(this.prototype, "handleClick", [action]);
|
|
117
|
+
}
|
|
118
|
+
static {
|
|
119
|
+
setComponentTemplate(precompileTemplate("<Button @variant={{@groupVariant}} @tone={{@groupTone}} @size={{@groupSize}} @isPressed={{this.isPressed}} @isDisabled={{this.isDisabled}} @isFullWidth={{@groupFullWidth}} @joinLeft={{@joinLeft}} @joinRight={{@joinRight}} {{on \"click\" this.handleClick}} ...attributes>\n {{yield}}\n</Button>", {
|
|
120
|
+
strictMode: true,
|
|
121
|
+
scope: () => ({
|
|
122
|
+
Button,
|
|
123
|
+
on
|
|
124
|
+
})
|
|
125
|
+
}), this);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { ButtonGroup as default };
|
|
130
|
+
//# sourceMappingURL=button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/action/button.css
CHANGED
|
@@ -358,3 +358,155 @@
|
|
|
358
358
|
transform: rotate(360deg);
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
+
|
|
362
|
+
/* ===================================
|
|
363
|
+
* Pressed State (Outline variant)
|
|
364
|
+
* =================================== */
|
|
365
|
+
|
|
366
|
+
/* Neutral */
|
|
367
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="neutral"],
|
|
368
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="neutral"] {
|
|
369
|
+
background: var(--color-bg-fill-neutral);
|
|
370
|
+
color: var(--color-text-on-neutral);
|
|
371
|
+
border-color: var(--color-bg-fill-neutral);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="neutral"]:hover:not(
|
|
375
|
+
:disabled
|
|
376
|
+
),
|
|
377
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="neutral"]:hover:not(
|
|
378
|
+
:disabled
|
|
379
|
+
) {
|
|
380
|
+
background: var(--color-bg-fill-neutral-hover);
|
|
381
|
+
border-color: var(--color-bg-fill-neutral-hover);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="neutral"]:active:not(
|
|
385
|
+
:disabled
|
|
386
|
+
),
|
|
387
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="neutral"]:active:not(
|
|
388
|
+
:disabled
|
|
389
|
+
) {
|
|
390
|
+
background: var(--color-bg-fill-neutral-active);
|
|
391
|
+
border-color: var(--color-bg-fill-neutral-active);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* Primary */
|
|
395
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="primary"],
|
|
396
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="primary"] {
|
|
397
|
+
background: var(--color-bg-fill-primary);
|
|
398
|
+
color: var(--color-text-on-primary);
|
|
399
|
+
border-color: var(--color-bg-fill-primary);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="primary"]:hover:not(
|
|
403
|
+
:disabled
|
|
404
|
+
),
|
|
405
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="primary"]:hover:not(
|
|
406
|
+
:disabled
|
|
407
|
+
) {
|
|
408
|
+
background: var(--color-bg-fill-primary-hover);
|
|
409
|
+
border-color: var(--color-bg-fill-primary-hover);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="primary"]:active:not(
|
|
413
|
+
:disabled
|
|
414
|
+
),
|
|
415
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="primary"]:active:not(
|
|
416
|
+
:disabled
|
|
417
|
+
) {
|
|
418
|
+
background: var(--color-bg-fill-primary-active);
|
|
419
|
+
border-color: var(--color-bg-fill-primary-active);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* Critical */
|
|
423
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="critical"],
|
|
424
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="critical"] {
|
|
425
|
+
background: var(--color-bg-fill-critical);
|
|
426
|
+
color: var(--color-text-on-critical);
|
|
427
|
+
border-color: var(--color-bg-fill-critical);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="critical"]:hover:not(
|
|
431
|
+
:disabled
|
|
432
|
+
),
|
|
433
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="critical"]:hover:not(
|
|
434
|
+
:disabled
|
|
435
|
+
) {
|
|
436
|
+
background: var(--color-bg-fill-critical-hover);
|
|
437
|
+
border-color: var(--color-bg-fill-critical-hover);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="outline"][data-tone="critical"]:active:not(
|
|
441
|
+
:disabled
|
|
442
|
+
),
|
|
443
|
+
.button_e0e07a6eb[data-pressed="true"][data-variant="solid"][data-tone="critical"]:active:not(
|
|
444
|
+
:disabled
|
|
445
|
+
) {
|
|
446
|
+
background: var(--color-bg-fill-critical-active);
|
|
447
|
+
border-color: var(--color-bg-fill-critical-active);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* ===================================
|
|
451
|
+
* Join (joinLeft / joinRight)
|
|
452
|
+
* =================================== */
|
|
453
|
+
|
|
454
|
+
.button_e0e07a6eb[data-join-left="true"] {
|
|
455
|
+
border-top-left-radius: 0;
|
|
456
|
+
border-bottom-left-radius: 0;
|
|
457
|
+
margin-left: -1px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.button_e0e07a6eb[data-join-right="true"] {
|
|
461
|
+
border-top-right-radius: 0;
|
|
462
|
+
border-bottom-right-radius: 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/* Instant feedback for joined buttons (e.g. segmented groups) */
|
|
466
|
+
.button_e0e07a6eb[data-join-left="true"],
|
|
467
|
+
.button_e0e07a6eb[data-join-right="true"] {
|
|
468
|
+
transition: none;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* Prevent border-color shift on hover for joined neutral buttons */
|
|
472
|
+
.button_e0e07a6eb[data-join-left="true"][data-variant="outline"][data-tone="neutral"]:hover:not(
|
|
473
|
+
:disabled
|
|
474
|
+
),
|
|
475
|
+
.button_e0e07a6eb[data-join-right="true"][data-variant="outline"][data-tone="neutral"]:hover:not(
|
|
476
|
+
:disabled
|
|
477
|
+
),
|
|
478
|
+
.button_e0e07a6eb[data-join-left="true"][data-variant="outline"][data-tone="neutral"]:active:not(
|
|
479
|
+
:disabled
|
|
480
|
+
),
|
|
481
|
+
.button_e0e07a6eb[data-join-right="true"][data-variant="outline"][data-tone="neutral"]:active:not(
|
|
482
|
+
:disabled
|
|
483
|
+
) {
|
|
484
|
+
border-color: var(--color-border-neutral);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.button_e0e07a6eb[data-join-left="true"][data-variant="solid"][data-tone="neutral"]:hover:not(
|
|
488
|
+
:disabled
|
|
489
|
+
),
|
|
490
|
+
.button_e0e07a6eb[data-join-right="true"][data-variant="solid"][data-tone="neutral"]:hover:not(
|
|
491
|
+
:disabled
|
|
492
|
+
),
|
|
493
|
+
.button_e0e07a6eb[data-join-left="true"][data-variant="solid"][data-tone="neutral"]:active:not(
|
|
494
|
+
:disabled
|
|
495
|
+
),
|
|
496
|
+
.button_e0e07a6eb[data-join-right="true"][data-variant="solid"][data-tone="neutral"]:active:not(
|
|
497
|
+
:disabled
|
|
498
|
+
) {
|
|
499
|
+
border-color: var(--color-border-control);
|
|
500
|
+
box-shadow: none;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/* Ensure active/focused joined button appears above neighbors */
|
|
504
|
+
.button_e0e07a6eb[data-join-left="true"]:hover,
|
|
505
|
+
.button_e0e07a6eb[data-join-right="true"]:hover,
|
|
506
|
+
.button_e0e07a6eb[data-join-left="true"]:focus-visible,
|
|
507
|
+
.button_e0e07a6eb[data-join-right="true"]:focus-visible,
|
|
508
|
+
.button_e0e07a6eb[data-join-left="true"][data-pressed="true"],
|
|
509
|
+
.button_e0e07a6eb[data-join-right="true"][data-pressed="true"] {
|
|
510
|
+
z-index: 1;
|
|
511
|
+
position: relative;
|
|
512
|
+
}
|
package/dist/action/button.js
CHANGED
|
@@ -37,7 +37,7 @@ class Button extends Component {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
static {
|
|
40
|
-
setComponentTemplate(precompileTemplate("{{#if this.isLink}}\n <a class=\"button_e0e07a6eb\" href={{@href}} target={{@target}} aria-label={{@aria-label}} aria-busy={{if @isLoading \"true\"}} data-variant={{this.variant}} data-tone={{this.tone}} data-size={{this.size}} data-loading={{if @isLoading \"true\"}} data-disabled={{if this.isDisabledOrLoading \"true\"}} data-full-width={{if @isFullWidth \"true\"}} data-icon-only={{if (has-block) \"false\" \"true\"}} data-pressed={{this.ariaPressed}} data-test-button {{on \"click\" this.handleLinkClick}} ...attributes>\n {{#if @isLoading}}\n <span class=\"button-spinner_e0e07a6eb\" data-test-button-spinner></span>\n {{/if}}\n {{#if (has-block \"prefix\")}}\n <span class=\"button-prefix_e0e07a6eb\" data-test-button-prefix>\n {{yield to=\"prefix\"}}\n </span>\n {{/if}}\n <span class=\"button-label_e0e07a6eb\">\n {{#if @isLoading}}\n {{#if @loadingText}}\n {{@loadingText}}\n {{else}}\n {{yield}}\n {{/if}}\n {{else}}\n {{yield}}\n {{/if}}\n </span>\n {{#if (has-block \"suffix\")}}\n <span class=\"button-suffix_e0e07a6eb\" data-test-button-suffix>\n {{yield to=\"suffix\"}}\n </span>\n {{/if}}\n </a>\n{{else}}\n <button class=\"button_e0e07a6eb\" type={{this.buttonType}} disabled={{this.isDisabledOrLoading}} aria-label={{@aria-label}} aria-busy={{if @isLoading \"true\"}} aria-pressed={{this.ariaPressed}} data-variant={{this.variant}} data-tone={{this.tone}} data-size={{this.size}} data-loading={{if @isLoading \"true\"}} data-disabled={{if @isDisabled \"true\"}} data-full-width={{if @isFullWidth \"true\"}} data-icon-only={{if (has-block) \"false\" \"true\"}} data-pressed={{this.ariaPressed}} data-test-button ...attributes>\n {{#if @isLoading}}\n <span class=\"button-spinner_e0e07a6eb\" data-test-button-spinner></span>\n {{/if}}\n {{#if (has-block \"prefix\")}}\n <span class=\"button-prefix_e0e07a6eb\" data-test-button-prefix>\n {{yield to=\"prefix\"}}\n </span>\n {{/if}}\n <span class=\"button-label_e0e07a6eb\">\n {{#if @isLoading}}\n {{#if @loadingText}}\n {{@loadingText}}\n {{else}}\n {{yield}}\n {{/if}}\n {{else}}\n {{yield}}\n {{/if}}\n </span>\n {{#if (has-block \"suffix\")}}\n <span class=\"button-suffix_e0e07a6eb\" data-test-button-suffix>\n {{yield to=\"suffix\"}}\n </span>\n {{/if}}\n </button>\n{{/if}}", {
|
|
40
|
+
setComponentTemplate(precompileTemplate("{{#if this.isLink}}\n <a class=\"button_e0e07a6eb\" href={{@href}} target={{@target}} aria-label={{@aria-label}} aria-busy={{if @isLoading \"true\"}} data-variant={{this.variant}} data-tone={{this.tone}} data-size={{this.size}} data-loading={{if @isLoading \"true\"}} data-disabled={{if this.isDisabledOrLoading \"true\"}} data-full-width={{if @isFullWidth \"true\"}} data-icon-only={{if (has-block) \"false\" \"true\"}} data-pressed={{this.ariaPressed}} data-join-left={{if @joinLeft \"true\"}} data-join-right={{if @joinRight \"true\"}} data-test-button {{on \"click\" this.handleLinkClick}} ...attributes>\n {{#if @isLoading}}\n <span class=\"button-spinner_e0e07a6eb\" data-test-button-spinner></span>\n {{/if}}\n {{#if (has-block \"prefix\")}}\n <span class=\"button-prefix_e0e07a6eb\" data-test-button-prefix>\n {{yield to=\"prefix\"}}\n </span>\n {{/if}}\n <span class=\"button-label_e0e07a6eb\">\n {{#if @isLoading}}\n {{#if @loadingText}}\n {{@loadingText}}\n {{else}}\n {{yield}}\n {{/if}}\n {{else}}\n {{yield}}\n {{/if}}\n </span>\n {{#if (has-block \"suffix\")}}\n <span class=\"button-suffix_e0e07a6eb\" data-test-button-suffix>\n {{yield to=\"suffix\"}}\n </span>\n {{/if}}\n </a>\n{{else}}\n <button class=\"button_e0e07a6eb\" type={{this.buttonType}} disabled={{this.isDisabledOrLoading}} aria-label={{@aria-label}} aria-busy={{if @isLoading \"true\"}} aria-pressed={{this.ariaPressed}} data-variant={{this.variant}} data-tone={{this.tone}} data-size={{this.size}} data-loading={{if @isLoading \"true\"}} data-disabled={{if @isDisabled \"true\"}} data-full-width={{if @isFullWidth \"true\"}} data-icon-only={{if (has-block) \"false\" \"true\"}} data-pressed={{this.ariaPressed}} data-join-left={{if @joinLeft \"true\"}} data-join-right={{if @joinRight \"true\"}} data-test-button ...attributes>\n {{#if @isLoading}}\n <span class=\"button-spinner_e0e07a6eb\" data-test-button-spinner></span>\n {{/if}}\n {{#if (has-block \"prefix\")}}\n <span class=\"button-prefix_e0e07a6eb\" data-test-button-prefix>\n {{yield to=\"prefix\"}}\n </span>\n {{/if}}\n <span class=\"button-label_e0e07a6eb\">\n {{#if @isLoading}}\n {{#if @loadingText}}\n {{@loadingText}}\n {{else}}\n {{yield}}\n {{/if}}\n {{else}}\n {{yield}}\n {{/if}}\n </span>\n {{#if (has-block \"suffix\")}}\n <span class=\"button-suffix_e0e07a6eb\" data-test-button-suffix>\n {{yield to=\"suffix\"}}\n </span>\n {{/if}}\n </button>\n{{/if}}", {
|
|
41
41
|
strictMode: true,
|
|
42
42
|
scope: () => ({
|
|
43
43
|
on
|
package/dist/action/index.js
CHANGED
package/dist/action/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/data/table.css
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/* src/data/table.css */
|
|
1
2
|
/* ============================================================================
|
|
2
3
|
Table Component Styles
|
|
3
4
|
============================================================================ */
|
|
4
5
|
|
|
5
|
-
.
|
|
6
|
+
.table_e4aed93fe {
|
|
6
7
|
width: 100%;
|
|
7
8
|
border-collapse: collapse;
|
|
8
9
|
font-size: var(--font-size-sm);
|
|
@@ -10,11 +11,11 @@
|
|
|
10
11
|
background-color: var(--color-bg-surface);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
.
|
|
14
|
+
.table_e4aed93fe:focus {
|
|
14
15
|
outline: none;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
.
|
|
18
|
+
.table_e4aed93fe:focus-visible {
|
|
18
19
|
/* Focus is tracked on individual rows, not the table container */
|
|
19
20
|
outline: none;
|
|
20
21
|
}
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
Caption
|
|
24
25
|
============================================================================ */
|
|
25
26
|
|
|
26
|
-
.
|
|
27
|
+
.caption_e4aed93fe {
|
|
27
28
|
padding: var(--spacing-3);
|
|
28
29
|
font-size: var(--font-size-sm);
|
|
29
30
|
font-weight: var(--font-weight-medium);
|
|
@@ -36,22 +37,22 @@
|
|
|
36
37
|
Header
|
|
37
38
|
============================================================================ */
|
|
38
39
|
|
|
39
|
-
.
|
|
40
|
+
.thead_e4aed93fe {
|
|
40
41
|
background-color: var(--color-bg-surface);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
.
|
|
44
|
+
.table_e4aed93fe[data-sticky-header="true"] .thead_e4aed93fe {
|
|
44
45
|
position: sticky;
|
|
45
46
|
top: 0;
|
|
46
47
|
z-index: 1;
|
|
47
48
|
background-color: var(--color-bg-surface);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
.header-
|
|
51
|
+
.header-row_e4aed93fe {
|
|
51
52
|
border-bottom: var(--border-width-1) solid var(--color-border);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
.header-
|
|
55
|
+
.header-cell_e4aed93fe {
|
|
55
56
|
padding: var(--spacing-3) var(--spacing-4);
|
|
56
57
|
font-weight: var(--font-weight-medium);
|
|
57
58
|
color: var(--color-text-secondary);
|
|
@@ -60,30 +61,30 @@
|
|
|
60
61
|
vertical-align: middle;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
.
|
|
64
|
+
.table_e4aed93fe[data-compact="true"] .header-cell_e4aed93fe {
|
|
64
65
|
padding: var(--spacing-2) var(--spacing-3);
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
.header-
|
|
68
|
+
.header-cell_e4aed93fe[data-align="center"] {
|
|
68
69
|
text-align: center;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
.header-
|
|
72
|
+
.header-cell_e4aed93fe[data-align="right"] {
|
|
72
73
|
text-align: right;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
.header-
|
|
76
|
+
.header-cell_e4aed93fe[data-sortable="true"] {
|
|
76
77
|
padding: 0;
|
|
77
78
|
cursor: pointer;
|
|
78
79
|
user-select: none;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
.header-
|
|
82
|
+
.header-cell_e4aed93fe[data-sortable="true"]:hover {
|
|
82
83
|
color: var(--color-text);
|
|
83
84
|
background-color: var(--color-bg-hover-subtle);
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
.header-
|
|
87
|
+
.header-cell_e4aed93fe[data-sorted="true"] {
|
|
87
88
|
color: var(--color-text);
|
|
88
89
|
}
|
|
89
90
|
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
Sort Button
|
|
92
93
|
============================================================================ */
|
|
93
94
|
|
|
94
|
-
.sort-
|
|
95
|
+
.sort-button_e4aed93fe {
|
|
95
96
|
display: flex;
|
|
96
97
|
align-items: center;
|
|
97
98
|
justify-content: space-between;
|
|
@@ -107,20 +108,20 @@
|
|
|
107
108
|
text-align: inherit;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
.
|
|
111
|
+
.table_e4aed93fe[data-compact="true"] .sort-button_e4aed93fe {
|
|
111
112
|
padding: var(--spacing-2) var(--spacing-3);
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
.sort-
|
|
115
|
+
.sort-button_e4aed93fe:focus-visible {
|
|
115
116
|
outline: 2px solid var(--color-border-focus);
|
|
116
117
|
outline-offset: -2px;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
.header-
|
|
120
|
+
.header-text_e4aed93fe {
|
|
120
121
|
display: inline;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
.sort-
|
|
124
|
+
.sort-icon_e4aed93fe {
|
|
124
125
|
display: inline-flex;
|
|
125
126
|
align-items: center;
|
|
126
127
|
justify-content: center;
|
|
@@ -128,16 +129,16 @@
|
|
|
128
129
|
height: var(--spacing-4);
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
.sort-
|
|
132
|
+
.sort-icon_e4aed93fe .icon_e4aed93fe {
|
|
132
133
|
width: var(--spacing-3);
|
|
133
134
|
height: var(--spacing-3);
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
.sort-
|
|
137
|
+
.sort-icon_e4aed93fe .icon-unsorted_e4aed93fe {
|
|
137
138
|
opacity: 0.4;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
.header-
|
|
141
|
+
.header-cell_e4aed93fe[data-sortable="true"]:hover .icon-unsorted_e4aed93fe {
|
|
141
142
|
opacity: 0.7;
|
|
142
143
|
}
|
|
143
144
|
|
|
@@ -145,46 +146,46 @@
|
|
|
145
146
|
Body
|
|
146
147
|
============================================================================ */
|
|
147
148
|
|
|
148
|
-
.
|
|
149
|
+
.tbody_e4aed93fe {
|
|
149
150
|
background-color: var(--color-bg-surface);
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
.
|
|
153
|
+
.row_e4aed93fe {
|
|
153
154
|
border-bottom: var(--border-width-1) solid var(--color-border);
|
|
154
155
|
transition: background-color 0.1s ease;
|
|
155
156
|
}
|
|
156
157
|
|
|
157
|
-
.
|
|
158
|
+
.row_e4aed93fe:last-child {
|
|
158
159
|
border-bottom: none;
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
.
|
|
162
|
+
.row_e4aed93fe:hover {
|
|
162
163
|
background-color: var(--color-bg-hover-subtle);
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
.
|
|
166
|
+
.row_e4aed93fe[data-disabled="true"] {
|
|
166
167
|
opacity: 0.5;
|
|
167
168
|
pointer-events: none;
|
|
168
169
|
}
|
|
169
170
|
|
|
170
|
-
.
|
|
171
|
+
.row_e4aed93fe[data-disabled="true"]:hover {
|
|
171
172
|
background-color: transparent;
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
.
|
|
175
|
+
.row_e4aed93fe[data-selected="true"] {
|
|
175
176
|
background-color: var(--color-bg-fill-accent-subtle);
|
|
176
177
|
}
|
|
177
178
|
|
|
178
|
-
.
|
|
179
|
+
.row_e4aed93fe[data-selected="true"]:hover {
|
|
179
180
|
background-color: var(--color-bg-fill-accent-subtle-hover);
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
.
|
|
183
|
+
.row_e4aed93fe[data-focused="true"] {
|
|
183
184
|
outline: 2px solid var(--color-border-focus);
|
|
184
185
|
outline-offset: -2px;
|
|
185
186
|
}
|
|
186
187
|
|
|
187
|
-
.
|
|
188
|
+
.row_e4aed93fe[data-clickable="true"] {
|
|
188
189
|
cursor: pointer;
|
|
189
190
|
}
|
|
190
191
|
|
|
@@ -192,24 +193,24 @@
|
|
|
192
193
|
Cells
|
|
193
194
|
============================================================================ */
|
|
194
195
|
|
|
195
|
-
.
|
|
196
|
+
.cell_e4aed93fe {
|
|
196
197
|
padding: var(--spacing-3) var(--spacing-4);
|
|
197
198
|
vertical-align: middle;
|
|
198
199
|
}
|
|
199
200
|
|
|
200
|
-
.
|
|
201
|
+
.table_e4aed93fe[data-compact="true"] .cell_e4aed93fe {
|
|
201
202
|
padding: var(--spacing-2) var(--spacing-3);
|
|
202
203
|
}
|
|
203
204
|
|
|
204
|
-
.
|
|
205
|
+
.cell_e4aed93fe[data-align="center"] {
|
|
205
206
|
text-align: center;
|
|
206
207
|
}
|
|
207
208
|
|
|
208
|
-
.
|
|
209
|
+
.cell_e4aed93fe[data-align="right"] {
|
|
209
210
|
text-align: right;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
.checkbox-
|
|
213
|
+
.checkbox-cell_e4aed93fe {
|
|
213
214
|
width: var(--spacing-10);
|
|
214
215
|
padding-right: 0;
|
|
215
216
|
}
|
|
@@ -218,8 +219,8 @@
|
|
|
218
219
|
Bordered Variant
|
|
219
220
|
============================================================================ */
|
|
220
221
|
|
|
221
|
-
.
|
|
222
|
-
.
|
|
222
|
+
.table_e4aed93fe[data-bordered="true"] .cell_e4aed93fe,
|
|
223
|
+
.table_e4aed93fe[data-bordered="true"] .header-cell_e4aed93fe {
|
|
223
224
|
border: var(--border-width-1) solid var(--color-border);
|
|
224
225
|
}
|
|
225
226
|
|
|
@@ -227,15 +228,15 @@
|
|
|
227
228
|
Striped Variant
|
|
228
229
|
============================================================================ */
|
|
229
230
|
|
|
230
|
-
.
|
|
231
|
+
.table_e4aed93fe[data-striped="true"] .row_e4aed93fe:nth-child(odd.e4aed93fe) {
|
|
231
232
|
background-color: var(--color-bg-surface-sunken);
|
|
232
233
|
}
|
|
233
234
|
|
|
234
|
-
.
|
|
235
|
+
.table_e4aed93fe[data-striped="true"] .row_e4aed93fe:nth-child(odd.e4aed93fe):hover {
|
|
235
236
|
background-color: var(--color-bg-hover-subtle);
|
|
236
237
|
}
|
|
237
238
|
|
|
238
|
-
.
|
|
239
|
+
.table_e4aed93fe[data-striped="true"] .row_e4aed93fe[data-selected="true"]:nth-child(odd.e4aed93fe) {
|
|
239
240
|
background-color: var(--color-bg-fill-accent-subtle);
|
|
240
241
|
}
|
|
241
242
|
|
|
@@ -243,15 +244,15 @@
|
|
|
243
244
|
Empty State
|
|
244
245
|
============================================================================ */
|
|
245
246
|
|
|
246
|
-
.empty-
|
|
247
|
+
.empty-row_e4aed93fe {
|
|
247
248
|
background-color: transparent;
|
|
248
249
|
}
|
|
249
250
|
|
|
250
|
-
.empty-
|
|
251
|
+
.empty-row_e4aed93fe:hover {
|
|
251
252
|
background-color: transparent;
|
|
252
253
|
}
|
|
253
254
|
|
|
254
|
-
.empty-
|
|
255
|
+
.empty-cell_e4aed93fe {
|
|
255
256
|
padding: var(--spacing-8) var(--spacing-4);
|
|
256
257
|
text-align: center;
|
|
257
258
|
color: var(--color-text-secondary);
|
|
@@ -261,10 +262,10 @@
|
|
|
261
262
|
Loading State
|
|
262
263
|
============================================================================ */
|
|
263
264
|
|
|
264
|
-
.skeleton-
|
|
265
|
+
.skeleton-row_e4aed93fe {
|
|
265
266
|
pointer-events: none;
|
|
266
267
|
}
|
|
267
268
|
|
|
268
|
-
.
|
|
269
|
+
.table_e4aed93fe[data-loading="true"] {
|
|
269
270
|
pointer-events: none;
|
|
270
271
|
}
|
package/dist/data/table.js
CHANGED
|
@@ -440,7 +440,7 @@ class Table extends Component {
|
|
|
440
440
|
// Template
|
|
441
441
|
// ============================================================================
|
|
442
442
|
static {
|
|
443
|
-
setComponentTemplate(precompileTemplate("<table class=\"
|
|
443
|
+
setComponentTemplate(precompileTemplate("<table class=\"table_e4aed93fe\" data-sticky-header={{if @hasStickyHeader \"true\"}} data-striped={{if @isStriped \"true\"}} data-bordered={{if @isBordered \"true\"}} data-compact={{if @isCompact \"true\"}} data-loading={{if @isLoading \"true\"}} data-test-table tabindex=\"0\" {{this.setupRef}} {{!-- template-lint-disable no-pointer-down-event-binding --}} {{on \"mousedown\" this.handleMouseDown}} {{on \"keydown\" this.handleKeyDown}} {{on \"focus\" this.handleFocus}} {{on \"blur\" this.handleBlur}} ...attributes>\n {{#if @caption}}\n <caption class=\"caption_e4aed93fe\" data-test-table-caption>\n {{@caption}}\n </caption>\n {{/if}}\n\n <thead class=\"thead_e4aed93fe\" data-test-table-header>\n <tr class=\"header-row_e4aed93fe\">\n {{#if @isSelectable}}\n <th class=\"header-cell_e4aed93fe checkbox-cell_e4aed93fe\" data-test-table-header-checkbox>\n <Checkbox @isChecked={{this.allRowsSelected}} @isIndeterminate={{this.someRowsSelected}} @isLabelHidden={{true}} @label=\"Select all rows\" @size=\"sm\" data-table-checkbox {{on \"change\" this.handleSelectAll}} />\n </th>\n {{/if}}\n\n {{#each this.visibleColumns as |column|}}\n <th class=\"header-cell_e4aed93fe\" data-align={{column.align}} data-sortable={{if (this.isColumnSortable column) \"true\"}} data-sorted={{if (this.getColumnSortDirection column) \"true\"}} data-sort-direction={{this.getColumnSortDirection column}} aria-sort={{this.getAriaSortValue column}} style={{if column.width (concat \"width:\" column.width \";\")}} data-test-table-header-cell data-test-column-id={{column.id}}>\n {{#if (this.isColumnSortable column)}}\n <button type=\"button\" class=\"sort-button_e4aed93fe\" {{on \"click\" (fn this.handleSort column)}} data-test-table-sort-button>\n <span class=\"header-text_e4aed93fe\">{{column.header}}</span>\n <span class=\"sort-icon_e4aed93fe\" aria-hidden=\"true\">\n {{#if (this.getColumnSortDirection column)}}\n {{#if (eq (this.getColumnSortDirection column) \"asc\")}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe\">\n <path d=\"M4 10l4-4 4 4\" />\n </svg>\n {{else}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe\">\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n {{/if}}\n {{else}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe icon-unsorted_e4aed93fe\">\n <path d=\"M4 6l4-3 4 3M4 10l4 3 4-3\" />\n </svg>\n {{/if}}\n </span>\n </button>\n {{else}}\n <span class=\"header-text_e4aed93fe\">{{column.header}}</span>\n {{/if}}\n </th>\n {{/each}}\n </tr>\n </thead>\n\n <tbody class=\"tbody_e4aed93fe\" data-test-table-body>\n {{#if @isLoading}}\n {{#if (has-block \"loading\")}}\n {{yield to=\"loading\"}}\n {{else}}\n {{!-- template-lint-disable no-unused-block-params --}}\n {{#each (repeat this.loadingRowCount)}}\n <tr class=\"row_e4aed93fe skeleton-row_e4aed93fe\" data-test-table-skeleton-row>\n {{#if @isSelectable}}\n <td class=\"cell_e4aed93fe checkbox-cell_e4aed93fe\">\n <Skeleton @width={{16}} @height={{16}} @radius=\"sm\" />\n </td>\n {{/if}}\n {{#each this.visibleColumns as |column|}}\n <td class=\"cell_e4aed93fe\" data-align={{column.align}}>\n <Skeleton @width=\"70%\" @height={{16}} />\n </td>\n {{/each}}\n </tr>\n {{/each}}\n {{/if}}\n {{else if this.isEmpty}}\n {{#if (has-block \"empty\")}}\n <tr class=\"empty-row_e4aed93fe\">\n <td colspan={{if @isSelectable (add (len this.visibleColumns) 1) (len this.visibleColumns)}}>\n {{yield to=\"empty\"}}\n </td>\n </tr>\n {{else}}\n <tr class=\"empty-row_e4aed93fe\" data-test-table-empty>\n <td class=\"empty-cell_e4aed93fe\" colspan={{if @isSelectable (add (len this.visibleColumns) 1) (len this.visibleColumns)}}>\n {{#if @emptyMessage}}\n {{@emptyMessage}}\n {{else}}\n No data available\n {{/if}}\n </td>\n </tr>\n {{/if}}\n {{else}}\n {{#each this.displayData as |row rowIndex|}}\n {{!-- template-lint-disable no-invalid-interactive --}}\n <tr id={{this.getRowElementId row}} class=\"row_e4aed93fe\" data-selected={{if (this.isRowSelected row) \"true\" \"false\"}} data-focused={{if (this.isRowFocused rowIndex) \"true\" \"false\"}} data-disabled={{if (@isRowDisabled row) \"true\" \"false\"}} data-clickable={{if @onRowClick \"true\"}} aria-selected={{if @isSelectable (if (this.isRowSelected row) \"true\" \"false\")}} data-test-table-row data-test-row-id={{this.getRowId row}} {{on \"click\" (fn this.handleRowClick row)}}>\n {{#if @isSelectable}}\n <td class=\"cell_e4aed93fe checkbox-cell_e4aed93fe\" data-test-table-row-checkbox>\n <Checkbox @isChecked={{this.isRowSelected row}} @isDisabled={{@isRowDisabled row}} @isLabelHidden={{true}} @label=\"Select row\" @size=\"sm\" data-table-checkbox {{on \"click\" (fn this.handleRowSelect row)}} />\n </td>\n {{/if}}\n\n {{#each this.visibleColumns as |column|}}\n <td class=\"cell_e4aed93fe\" data-align={{column.align}} data-test-table-cell data-test-column-id={{column.id}}>\n {{#if (has-block \"cell\")}}\n {{yield (this.getCellContext row column rowIndex) to=\"cell\"}}\n {{else}}\n {{this.formatCellValue row column}}\n {{/if}}\n </td>\n {{/each}}\n </tr>\n {{/each}}\n {{/if}}\n </tbody>\n</table>", {
|
|
444
444
|
strictMode: true,
|
|
445
445
|
scope: () => ({
|
|
446
446
|
on,
|