@visitwonders/assembly 0.1.0 → 0.3.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/index.d.ts +1 -0
- package/declarations/data/index.d.ts.map +1 -1
- package/declarations/data/sortable-list.d.ts +33 -0
- package/declarations/data/sortable-list.d.ts.map +1 -0
- 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/layout/stack.d.ts +1 -1
- 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/typography/text.d.ts +2 -0
- package/declarations/typography/text.d.ts.map +1 -1
- 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_/data/sortable-list.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/index.js +1 -0
- package/dist/data/index.js.map +1 -1
- package/dist/data/sortable-list-css-211fcfeedc08052ccbac7f51549ce0b1.css +89 -0
- package/dist/data/sortable-list.js +62 -0
- package/dist/data/sortable-list.js.map +1 -0
- package/dist/data/table.css +50 -49
- 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/dist/typography/{text-css-73e03f1b750b32d7064d4ef87562289c.css → text-css-935f55e9cd74b06a5ce61330c4c79ef9.css} +6 -1
- package/dist/typography/text.js +5 -2
- package/package.json +26 -19
- 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
package/dist/data/table.css
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
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
|
-
font-size: var(--font-size-
|
|
9
|
+
font-size: var(--font-size-md);
|
|
9
10
|
color: var(--color-text);
|
|
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
|
-
border-bottom: var(--border-width-1) solid var(--color-border);
|
|
153
|
+
.row_e4aed93fe {
|
|
154
|
+
border-bottom: var(--border-width-1) solid var(--color-border-subtle);
|
|
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,
|
package/dist/form/checkbox.css
CHANGED
|
@@ -147,17 +147,17 @@
|
|
|
147
147
|
.label_eed179744 {
|
|
148
148
|
font-size: var(--font-size-md);
|
|
149
149
|
color: var(--color-text);
|
|
150
|
-
line-height: var(--
|
|
150
|
+
line-height: var(--line-height-20);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.wrapper_eed179744[data-size="sm"] .label_eed179744 {
|
|
154
154
|
font-size: var(--font-size-sm);
|
|
155
|
-
line-height: var(--
|
|
155
|
+
line-height: var(--line-height-16);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
.wrapper_eed179744[data-size="lg"] .label_eed179744 {
|
|
159
159
|
font-size: var(--font-size-lg);
|
|
160
|
-
line-height: var(--
|
|
160
|
+
line-height: var(--line-height-24);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.label_eed179744[data-visually-hidden="true"] {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* <inline>/src/form/control-css-02e93d930aecac651d5c69dc10a83504.css */
|
|
2
|
+
|
|
3
|
+
.assembly-control_e529e8199 {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--spacing-2);
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.assembly-control_e529e8199[data-orientation="horizontal"] {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: var(--spacing-6);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.assembly-control_e529e8199[data-orientation="horizontal"] .label {
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
min-width: 120px;
|
|
19
|
+
padding-top: var(--spacing-2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.assembly-control_e529e8199[data-max-width="xs"] {
|
|
23
|
+
max-width: 120px;
|
|
24
|
+
}
|
|
25
|
+
.assembly-control_e529e8199[data-max-width="sm"] {
|
|
26
|
+
max-width: 200px;
|
|
27
|
+
}
|
|
28
|
+
.assembly-control_e529e8199[data-max-width="md"] {
|
|
29
|
+
max-width: 320px;
|
|
30
|
+
}
|
|
31
|
+
.assembly-control_e529e8199[data-max-width="lg"] {
|
|
32
|
+
max-width: 480px;
|
|
33
|
+
}
|
|
34
|
+
.assembly-control_e529e8199[data-max-width="xl"] {
|
|
35
|
+
max-width: 640px;
|
|
36
|
+
}
|
package/dist/form/control.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./control-css-
|
|
1
|
+
import "./control-css-02e93d930aecac651d5c69dc10a83504.css"
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { guidFor } from '@ember/object/internals';
|
|
4
4
|
import { hash } from '@ember/helper';
|
|
@@ -39,7 +39,7 @@ class Control extends Component {
|
|
|
39
39
|
return this.args.isReadOnly ?? false;
|
|
40
40
|
}
|
|
41
41
|
static {
|
|
42
|
-
setComponentTemplate(precompileTemplate("\n\n<div class=\"assembly-control_e529e8199\" data-orientation={{this.orientation}} data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if this.isDisabled \"true\" \"false\"}} data-required={{if this.isRequired \"true\" \"false\"}} data-readonly={{if this.isReadOnly \"true\" \"false\"}} data-test-form-control ...attributes>\n {{yield (hash Label=(component Label for=this.id isRequired=this.isRequired isDisabled=this.isDisabled) Input=(component Input id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) Textarea=(component Textarea id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) HelpText=(component HelpText id=this.helpTextId) ErrorMessage=(component ErrorMessage id=this.errorMessageId isInvalid=this.isInvalid) id=this.id isInvalid=this.isInvalid isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly)}}\n</div>", {
|
|
42
|
+
setComponentTemplate(precompileTemplate("\n\n<div class=\"assembly-control_e529e8199\" data-orientation={{this.orientation}} data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if this.isDisabled \"true\" \"false\"}} data-required={{if this.isRequired \"true\" \"false\"}} data-readonly={{if this.isReadOnly \"true\" \"false\"}} data-test-form-control ...attributes>\n {{yield (hash Label=(component Label for=this.id isRequired=this.isRequired isDisabled=this.isDisabled info=@labelInfo) Input=(component Input id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) Textarea=(component Textarea id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) HelpText=(component HelpText id=this.helpTextId) ErrorMessage=(component ErrorMessage id=this.errorMessageId isInvalid=this.isInvalid) id=this.id isInvalid=this.isInvalid isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly)}}\n</div>", {
|
|
43
43
|
strictMode: true,
|
|
44
44
|
scope: () => ({
|
|
45
45
|
hash,
|
|
@@ -23,7 +23,7 @@ class CountrySelectField extends Component {
|
|
|
23
23
|
return parts.length > 0 ? parts.join(' ') : undefined;
|
|
24
24
|
};
|
|
25
25
|
static {
|
|
26
|
-
setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n
|
|
26
|
+
setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <CountrySelect @id={{ctrl.id}} @name={{@name}} @value={{@value}} @placeholder={{@placeholder}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @showFlag={{@showFlag}} @showDialCode={{@showDialCode}} @displayDialCode={{@displayDialCode}} @suggestedCountries={{@suggestedCountries}} @prioritizeByLocale={{@prioritizeByLocale}} @includeOnly={{@includeOnly}} @exclude={{@exclude}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} data-test-country-select-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
|
|
27
27
|
strictMode: true,
|
|
28
28
|
scope: () => ({
|
|
29
29
|
Control,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-select-field.js","sources":["../../src/form/country-select-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport CountrySelect from './country-select.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface CountrySelectFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected value (ISO country code) */\n value?: string;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Help text displayed below the select */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Show flag emoji in options and trigger (default: true) */\n showFlag?: boolean;\n\n /** Show dial code in options */\n showDialCode?: boolean;\n\n /** Show dial code in the selected value display */\n displayDialCode?: boolean;\n\n /** ISO codes to show at top as suggested */\n suggestedCountries?: string[];\n\n /** Auto-suggest based on browser locale (default: false) */\n prioritizeByLocale?: boolean;\n\n /** Only show these countries (ISO codes) */\n includeOnly?: string[];\n\n /** Hide these countries (ISO codes) */\n exclude?: string[];\n\n /** Change event handler */\n onChange?: (countryCode: string | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n };\n}\n\nexport default class CountrySelectField extends Component<CountrySelectFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n
|
|
1
|
+
{"version":3,"file":"country-select-field.js","sources":["../../src/form/country-select-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport CountrySelect from './country-select.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface CountrySelectFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected value (ISO country code) */\n value?: string;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Help text displayed below the select */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Show flag emoji in options and trigger (default: true) */\n showFlag?: boolean;\n\n /** Show dial code in options */\n showDialCode?: boolean;\n\n /** Show dial code in the selected value display */\n displayDialCode?: boolean;\n\n /** ISO codes to show at top as suggested */\n suggestedCountries?: string[];\n\n /** Auto-suggest based on browser locale (default: false) */\n prioritizeByLocale?: boolean;\n\n /** Only show these countries (ISO codes) */\n includeOnly?: string[];\n\n /** Hide these countries (ISO codes) */\n exclude?: string[];\n\n /** Change event handler */\n onChange?: (countryCode: string | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n };\n Blocks: {\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class CountrySelectField extends Component<CountrySelectFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <CountrySelect\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @placeholder={{@placeholder}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @showFlag={{@showFlag}}\n @showDialCode={{@showDialCode}}\n @displayDialCode={{@displayDialCode}}\n @suggestedCountries={{@suggestedCountries}}\n @prioritizeByLocale={{@prioritizeByLocale}}\n @includeOnly={{@includeOnly}}\n @exclude={{@exclude}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n data-test-country-select-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["CountrySelectField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","CountrySelect"],"mappings":";;;;;;AA4Ee,MAAMA,2BAA2BC,SAAA,CAAU;EACxD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,+rCAAA,EAkDA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
padding: var(--spacing-2) var(--spacing-3);
|
|
230
230
|
border-radius: var(--radius-sm);
|
|
231
231
|
font-size: var(--font-size-13);
|
|
232
|
-
line-height: var(--line-height-
|
|
232
|
+
line-height: var(--line-height-tight);
|
|
233
233
|
color: var(--color-text);
|
|
234
234
|
cursor: pointer;
|
|
235
235
|
user-select: none;
|
|
@@ -23,7 +23,7 @@ class DatePickerField extends Component {
|
|
|
23
23
|
return parts.length > 0 ? parts.join(' ') : undefined;
|
|
24
24
|
};
|
|
25
25
|
static {
|
|
26
|
-
setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n
|
|
26
|
+
setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DatePicker @id={{ctrl.id}} @name={{@name}} @value={{@value}} @defaultValue={{@defaultValue}} @placeholder={{@placeholder}} @format={{@format}} @minDate={{@minDate}} @maxDate={{@maxDate}} @disabledDates={{@disabledDates}} @disabledDaysOfWeek={{@disabledDaysOfWeek}} @weekStartsOn={{@weekStartsOn}} @showOutsideDays={{@showOutsideDays}} @showToday={{@showToday}} @allowTextInput={{@allowTextInput}} @closeOnSelect={{@closeOnSelect}} @showIcon={{@showIcon}} @clearable={{@clearable}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @onOpenChange={{@onOpenChange}} data-test-date-picker-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
|
|
27
27
|
strictMode: true,
|
|
28
28
|
scope: () => ({
|
|
29
29
|
Control,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-field.js","sources":["../../src/form/date-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DatePicker, { type DateFormat } from './date-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DatePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date value */\n value?: Date | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: Date | null;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Allow typing in the input */\n allowTextInput?: boolean;\n\n /** Close dropdown when a date is selected */\n closeOnSelect?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: Date | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n}\n\nexport default class DatePickerField extends Component<DatePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n
|
|
1
|
+
{"version":3,"file":"date-picker-field.js","sources":["../../src/form/date-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DatePicker, { type DateFormat } from './date-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DatePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date value */\n value?: Date | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: Date | null;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Allow typing in the input */\n allowTextInput?: boolean;\n\n /** Close dropdown when a date is selected */\n closeOnSelect?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: Date | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n Blocks: {\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class DatePickerField extends Component<DatePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DatePicker\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @defaultValue={{@defaultValue}}\n @placeholder={{@placeholder}}\n @format={{@format}}\n @minDate={{@minDate}}\n @maxDate={{@maxDate}}\n @disabledDates={{@disabledDates}}\n @disabledDaysOfWeek={{@disabledDaysOfWeek}}\n @weekStartsOn={{@weekStartsOn}}\n @showOutsideDays={{@showOutsideDays}}\n @showToday={{@showToday}}\n @allowTextInput={{@allowTextInput}}\n @closeOnSelect={{@closeOnSelect}}\n @showIcon={{@showIcon}}\n @clearable={{@clearable}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n @onOpenChange={{@onOpenChange}}\n data-test-date-picker-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["DatePickerField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","DatePicker"],"mappings":";;;;;;AAoGe,MAAMA,wBAAwBC,SAAA,CAAU;EACrD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,66CAAA,EA2DA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -23,7 +23,7 @@ class DateRangePickerField extends Component {
|
|
|
23
23
|
return parts.length > 0 ? parts.join(' ') : undefined;
|
|
24
24
|
};
|
|
25
25
|
static {
|
|
26
|
-
setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n
|
|
26
|
+
setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DateRangePicker @id={{ctrl.id}} @name={{@name}} @value={{@value}} @defaultValue={{@defaultValue}} @startPlaceholder={{@startPlaceholder}} @endPlaceholder={{@endPlaceholder}} @format={{@format}} @minDate={{@minDate}} @maxDate={{@maxDate}} @disabledDates={{@disabledDates}} @disabledDaysOfWeek={{@disabledDaysOfWeek}} @weekStartsOn={{@weekStartsOn}} @showOutsideDays={{@showOutsideDays}} @showToday={{@showToday}} @presets={{@presets}} @allowTextInput={{@allowTextInput}} @showIcon={{@showIcon}} @clearable={{@clearable}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @onOpenChange={{@onOpenChange}} data-test-date-range-picker-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
|
|
27
27
|
strictMode: true,
|
|
28
28
|
scope: () => ({
|
|
29
29
|
Control,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker-field.js","sources":["../../src/form/date-range-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DateRangePicker, {\n type DateFormat,\n type DateRangePreset,\n type DateRange,\n} from './date-range-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DateRangePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date range value */\n value?: DateRange | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: DateRange | null;\n\n /** Placeholder text for start date */\n startPlaceholder?: string;\n\n /** Placeholder text for end date */\n endPlaceholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Preset date range options */\n presets?: DateRangePreset[];\n\n /** Allow typing in the inputs */\n allowTextInput?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name prefix for forms (creates {name}_start and {name}_end) */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: DateRange | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n}\n\nexport default class DateRangePickerField extends Component<DateRangePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n
|
|
1
|
+
{"version":3,"file":"date-range-picker-field.js","sources":["../../src/form/date-range-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DateRangePicker, {\n type DateFormat,\n type DateRangePreset,\n type DateRange,\n} from './date-range-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DateRangePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date range value */\n value?: DateRange | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: DateRange | null;\n\n /** Placeholder text for start date */\n startPlaceholder?: string;\n\n /** Placeholder text for end date */\n endPlaceholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Preset date range options */\n presets?: DateRangePreset[];\n\n /** Allow typing in the inputs */\n allowTextInput?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name prefix for forms (creates {name}_start and {name}_end) */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: DateRange | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n Blocks: {\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class DateRangePickerField extends Component<DateRangePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DateRangePicker\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @defaultValue={{@defaultValue}}\n @startPlaceholder={{@startPlaceholder}}\n @endPlaceholder={{@endPlaceholder}}\n @format={{@format}}\n @minDate={{@minDate}}\n @maxDate={{@maxDate}}\n @disabledDates={{@disabledDates}}\n @disabledDaysOfWeek={{@disabledDaysOfWeek}}\n @weekStartsOn={{@weekStartsOn}}\n @showOutsideDays={{@showOutsideDays}}\n @showToday={{@showToday}}\n @presets={{@presets}}\n @allowTextInput={{@allowTextInput}}\n @showIcon={{@showIcon}}\n @clearable={{@clearable}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n @onOpenChange={{@onOpenChange}}\n data-test-date-range-picker-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["DateRangePickerField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","DateRangePicker"],"mappings":";;;;;;AA2Ge,MAAMA,6BAA6BC,SAAA,CAAU;EAC1D,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,09CAAA,EA4DA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
package/dist/form/field.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
font-size: 0.875rem;
|
|
11
11
|
font-weight: 500;
|
|
12
12
|
color: var(--color-text);
|
|
13
|
-
line-height:
|
|
13
|
+
line-height: var(--line-height-normal);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.required_e77bb2bf4 {
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
.helper-text_e77bb2bf4 {
|
|
29
29
|
margin: 0;
|
|
30
30
|
font-size: 0.8125rem;
|
|
31
|
-
line-height:
|
|
31
|
+
line-height: var(--line-height-tight);
|
|
32
32
|
color: var(--color-text-secondary);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.error-text_e77bb2bf4 {
|
|
36
36
|
margin: 0;
|
|
37
37
|
font-size: 0.8125rem;
|
|
38
|
-
line-height:
|
|
38
|
+
line-height: var(--line-height-tight);
|
|
39
39
|
color: var(--red-500);
|
|
40
40
|
}
|
|
41
41
|
|