@ni/ok-components 1.2.1 → 1.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/dist/all-components-bundle.js +3044 -530
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +6788 -5229
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +1423 -63
- package/dist/custom-elements.md +246 -13
- package/dist/esm/fv/accordion-item/index.d.ts +1 -0
- package/dist/esm/fv/accordion-item/index.js +1 -0
- package/dist/esm/fv/accordion-item/index.js.map +1 -1
- package/dist/esm/fv/accordion-item/testing/fv-accordion-item.pageobject.js +5 -0
- package/dist/esm/fv/accordion-item/testing/fv-accordion-item.pageobject.js.map +1 -1
- package/dist/esm/fv/all-fv.d.ts +7 -0
- package/dist/esm/fv/all-fv.js +7 -0
- package/dist/esm/fv/all-fv.js.map +1 -1
- package/dist/esm/fv/card/index.d.ts +59 -0
- package/dist/esm/fv/card/index.js +144 -0
- package/dist/esm/fv/card/index.js.map +1 -0
- package/dist/esm/fv/card/styles.d.ts +1 -0
- package/dist/esm/fv/card/styles.js +231 -0
- package/dist/esm/fv/card/styles.js.map +1 -0
- package/dist/esm/fv/card/template.d.ts +2 -0
- package/dist/esm/fv/card/template.js +126 -0
- package/dist/esm/fv/card/template.js.map +1 -0
- package/dist/esm/fv/card/types.d.ts +10 -0
- package/dist/esm/fv/card/types.js +9 -0
- package/dist/esm/fv/card/types.js.map +1 -0
- package/dist/esm/fv/chip-selector/index.d.ts +104 -0
- package/dist/esm/fv/chip-selector/index.js +367 -0
- package/dist/esm/fv/chip-selector/index.js.map +1 -0
- package/dist/esm/fv/chip-selector/styles.d.ts +1 -0
- package/dist/esm/fv/chip-selector/styles.js +251 -0
- package/dist/esm/fv/chip-selector/styles.js.map +1 -0
- package/dist/esm/fv/chip-selector/template.d.ts +2 -0
- package/dist/esm/fv/chip-selector/template.js +147 -0
- package/dist/esm/fv/chip-selector/template.js.map +1 -0
- package/dist/esm/fv/context-help/index.d.ts +22 -0
- package/dist/esm/fv/context-help/index.js +41 -0
- package/dist/esm/fv/context-help/index.js.map +1 -0
- package/dist/esm/fv/context-help/styles.d.ts +1 -0
- package/dist/esm/fv/context-help/styles.js +55 -0
- package/dist/esm/fv/context-help/styles.js.map +1 -0
- package/dist/esm/fv/context-help/template.d.ts +2 -0
- package/dist/esm/fv/context-help/template.js +24 -0
- package/dist/esm/fv/context-help/template.js.map +1 -0
- package/dist/esm/fv/context-help/types.d.ts +1 -0
- package/dist/esm/fv/context-help/types.js +2 -0
- package/dist/esm/fv/context-help/types.js.map +1 -0
- package/dist/esm/fv/search-input/index.d.ts +2 -0
- package/dist/esm/fv/search-input/index.js +2 -0
- package/dist/esm/fv/search-input/index.js.map +1 -1
- package/dist/esm/fv/search-input/styles.js +14 -14
- package/dist/esm/fv/search-input/styles.js.map +1 -1
- package/dist/esm/fv/split-button/index.d.ts +43 -0
- package/dist/esm/fv/split-button/index.js +130 -0
- package/dist/esm/fv/split-button/index.js.map +1 -0
- package/dist/esm/fv/split-button/styles.d.ts +1 -0
- package/dist/esm/fv/split-button/styles.js +220 -0
- package/dist/esm/fv/split-button/styles.js.map +1 -0
- package/dist/esm/fv/split-button/template.d.ts +2 -0
- package/dist/esm/fv/split-button/template.js +52 -0
- package/dist/esm/fv/split-button/template.js.map +1 -0
- package/dist/esm/fv/split-button/types.d.ts +12 -0
- package/dist/esm/fv/split-button/types.js +11 -0
- package/dist/esm/fv/split-button/types.js.map +1 -0
- package/dist/esm/fv/split-button-anchor/index.d.ts +47 -0
- package/dist/esm/fv/split-button-anchor/index.js +146 -0
- package/dist/esm/fv/split-button-anchor/index.js.map +1 -0
- package/dist/esm/fv/split-button-anchor/styles.d.ts +1 -0
- package/dist/esm/fv/split-button-anchor/styles.js +228 -0
- package/dist/esm/fv/split-button-anchor/styles.js.map +1 -0
- package/dist/esm/fv/split-button-anchor/template.d.ts +2 -0
- package/dist/esm/fv/split-button-anchor/template.js +64 -0
- package/dist/esm/fv/split-button-anchor/template.js.map +1 -0
- package/dist/esm/fv/split-button-anchor/types.d.ts +12 -0
- package/dist/esm/fv/split-button-anchor/types.js +11 -0
- package/dist/esm/fv/split-button-anchor/types.js.map +1 -0
- package/dist/esm/fv/summary-panel/index.d.ts +26 -0
- package/dist/esm/fv/summary-panel/index.js +70 -0
- package/dist/esm/fv/summary-panel/index.js.map +1 -0
- package/dist/esm/fv/summary-panel/styles.d.ts +1 -0
- package/dist/esm/fv/summary-panel/styles.js +49 -0
- package/dist/esm/fv/summary-panel/styles.js.map +1 -0
- package/dist/esm/fv/summary-panel/template.d.ts +2 -0
- package/dist/esm/fv/summary-panel/template.js +29 -0
- package/dist/esm/fv/summary-panel/template.js.map +1 -0
- package/dist/esm/fv/summary-panel-tile/index.d.ts +23 -0
- package/dist/esm/fv/summary-panel-tile/index.js +59 -0
- package/dist/esm/fv/summary-panel-tile/index.js.map +1 -0
- package/dist/esm/fv/summary-panel-tile/styles.d.ts +1 -0
- package/dist/esm/fv/summary-panel-tile/styles.js +138 -0
- package/dist/esm/fv/summary-panel-tile/styles.js.map +1 -0
- package/dist/esm/fv/summary-panel-tile/template.d.ts +2 -0
- package/dist/esm/fv/summary-panel-tile/template.js +14 -0
- package/dist/esm/fv/summary-panel-tile/template.js.map +1 -0
- package/dist/esm/fv/summary-panel-tile/types.d.ts +5 -0
- package/dist/esm/fv/summary-panel-tile/types.js +5 -0
- package/dist/esm/fv/summary-panel-tile/types.js.map +1 -0
- package/package.json +1 -1
package/dist/custom-elements.md
CHANGED
|
@@ -8,6 +8,40 @@
|
|
|
8
8
|
|
|
9
9
|
<hr/>
|
|
10
10
|
|
|
11
|
+
## class: `FvCard`
|
|
12
|
+
|
|
13
|
+
### Superclass
|
|
14
|
+
|
|
15
|
+
| Name | Module | Package |
|
|
16
|
+
| ------------------- | ------ | ------------------- |
|
|
17
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
18
|
+
|
|
19
|
+
### Fields
|
|
20
|
+
|
|
21
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
22
|
+
| ----------------- | ------- | --------------------------- | ------- | ----------- | -------------- |
|
|
23
|
+
| `title` | public | `string` | `''` | | |
|
|
24
|
+
| `subtitle` | public | `string` | `''` | | |
|
|
25
|
+
| `description` | public | `string` | `''` | | |
|
|
26
|
+
| `appearance` | public | `FvCardAppearanceType` | | | |
|
|
27
|
+
| `interactionMode` | public | `FvCardInteractionModeType` | | | |
|
|
28
|
+
| `disabled` | public | `boolean` | `false` | | |
|
|
29
|
+
| `initials` | public | `string` | `''` | | |
|
|
30
|
+
|
|
31
|
+
### Attributes
|
|
32
|
+
|
|
33
|
+
| Name | Field | Inherited From |
|
|
34
|
+
| ------------------ | --------------- | -------------- |
|
|
35
|
+
| `card-title` | title | |
|
|
36
|
+
| `subtitle` | subtitle | |
|
|
37
|
+
| `description` | description | |
|
|
38
|
+
| `appearance` | appearance | |
|
|
39
|
+
| `interaction-mode` | interactionMode | |
|
|
40
|
+
| `disabled` | disabled | |
|
|
41
|
+
| `initials` | initials | |
|
|
42
|
+
|
|
43
|
+
<hr/>
|
|
44
|
+
|
|
11
45
|
## class: `FvAccordionItem`
|
|
12
46
|
|
|
13
47
|
### Superclass
|
|
@@ -24,12 +58,6 @@
|
|
|
24
58
|
| `expanded` | public | `boolean` | `false` | | |
|
|
25
59
|
| `appearance` | public | `FvAccordionItemAppearance` | | | |
|
|
26
60
|
|
|
27
|
-
### Methods
|
|
28
|
-
|
|
29
|
-
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
30
|
-
| -------------- | ------- | ----------- | -------------- | --------- | -------------- |
|
|
31
|
-
| `handleToggle` | public | | `event: Event` | `boolean` | |
|
|
32
|
-
|
|
33
61
|
### Attributes
|
|
34
62
|
|
|
35
63
|
| Name | Field | Inherited From |
|
|
@@ -40,6 +68,74 @@
|
|
|
40
68
|
|
|
41
69
|
<hr/>
|
|
42
70
|
|
|
71
|
+
## class: `FvChipSelector`
|
|
72
|
+
|
|
73
|
+
### Superclass
|
|
74
|
+
|
|
75
|
+
| Name | Module | Package |
|
|
76
|
+
| ------------------- | ------ | ------------------- |
|
|
77
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
78
|
+
|
|
79
|
+
### Fields
|
|
80
|
+
|
|
81
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
82
|
+
| ------------------- | ------- | --------- | ----------------- | ----------- | -------------- |
|
|
83
|
+
| `disabled` | public | `boolean` | `false` | | |
|
|
84
|
+
| `open` | public | `boolean` | `false` | | |
|
|
85
|
+
| `label` | public | `string` | `''` | | |
|
|
86
|
+
| `selectedValues` | public | `string` | `''` | | |
|
|
87
|
+
| `options` | public | `string` | `''` | | |
|
|
88
|
+
| `placeholder` | public | `string` | `'Select values'` | | |
|
|
89
|
+
| `allowCustomValues` | public | `boolean` | `false` | | |
|
|
90
|
+
|
|
91
|
+
### Events
|
|
92
|
+
|
|
93
|
+
| Name | Type | Description | Inherited From |
|
|
94
|
+
| -------- | ------------- | ----------- | -------------- |
|
|
95
|
+
| `change` | `CustomEvent` | | |
|
|
96
|
+
|
|
97
|
+
### Attributes
|
|
98
|
+
|
|
99
|
+
| Name | Field | Inherited From |
|
|
100
|
+
| --------------------- | ----------------- | -------------- |
|
|
101
|
+
| `disabled` | disabled | |
|
|
102
|
+
| `open` | open | |
|
|
103
|
+
| `label` | label | |
|
|
104
|
+
| `selected-values` | selectedValues | |
|
|
105
|
+
| `options` | options | |
|
|
106
|
+
| `placeholder` | placeholder | |
|
|
107
|
+
| `allow-custom-values` | allowCustomValues | |
|
|
108
|
+
|
|
109
|
+
<hr/>
|
|
110
|
+
|
|
111
|
+
## class: `FvContextHelp`
|
|
112
|
+
|
|
113
|
+
### Superclass
|
|
114
|
+
|
|
115
|
+
| Name | Module | Package |
|
|
116
|
+
| ------------------- | ------ | ------------------- |
|
|
117
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
118
|
+
|
|
119
|
+
### Fields
|
|
120
|
+
|
|
121
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
122
|
+
| -------------- | ------- | ----------------------- | ------------- | ----------- | -------------- |
|
|
123
|
+
| `text` | public | `string` | `''` | | |
|
|
124
|
+
| `triggerLabel` | public | `string` | `'Show help'` | | |
|
|
125
|
+
| `severity` | public | `FvContextHelpSeverity` | | | |
|
|
126
|
+
| `iconVisible` | public | `boolean` | `false` | | |
|
|
127
|
+
|
|
128
|
+
### Attributes
|
|
129
|
+
|
|
130
|
+
| Name | Field | Inherited From |
|
|
131
|
+
| --------------- | ------------ | -------------- |
|
|
132
|
+
| `text` | text | |
|
|
133
|
+
| `trigger-label` | triggerLabel | |
|
|
134
|
+
| `severity` | severity | |
|
|
135
|
+
| `icon-visible` | iconVisible | |
|
|
136
|
+
|
|
137
|
+
<hr/>
|
|
138
|
+
|
|
43
139
|
## class: `FvSearchInput`
|
|
44
140
|
|
|
45
141
|
### Superclass
|
|
@@ -54,13 +150,6 @@
|
|
|
54
150
|
| ------------ | ------- | ----------------------------- | ------- | ----------- | -------------- |
|
|
55
151
|
| `appearance` | public | `FvSearchInputAppearanceType` | | | |
|
|
56
152
|
|
|
57
|
-
### Methods
|
|
58
|
-
|
|
59
|
-
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
60
|
-
| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | --------- | -------------- |
|
|
61
|
-
| `handleChange` | public | | | `void` | |
|
|
62
|
-
| `clear` | public | Clears the current value, restores focus to the text input, and
dispatches a synthetic \`input\` event on the host so consumers
observe the same immediate value-update contract as typing.
The inner \<input> value is updated on the next FAST render cycle
via the \`:value\` template binding. | | `boolean` | |
|
|
63
|
-
|
|
64
153
|
### Events
|
|
65
154
|
|
|
66
155
|
| Name | Type | Description | Inherited From |
|
|
@@ -75,6 +164,150 @@
|
|
|
75
164
|
|
|
76
165
|
<hr/>
|
|
77
166
|
|
|
167
|
+
## class: `FvSplitButton`
|
|
168
|
+
|
|
169
|
+
### Superclass
|
|
170
|
+
|
|
171
|
+
| Name | Module | Package |
|
|
172
|
+
| ------------------- | ------ | ------------------- |
|
|
173
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
174
|
+
|
|
175
|
+
### Fields
|
|
176
|
+
|
|
177
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
178
|
+
| ------------------- | ------- | ------------------------------------ | -------------------- | ----------- | -------------- |
|
|
179
|
+
| `label` | public | `string` | `'Primary function'` | | |
|
|
180
|
+
| `disabled` | public | `boolean` | `false` | | |
|
|
181
|
+
| `open` | public | `boolean` | `false` | | |
|
|
182
|
+
| `appearance` | public | `FvSplitButtonAppearanceType` | | | |
|
|
183
|
+
| `appearanceVariant` | public | `FvSplitButtonAppearanceVariantType` | | | |
|
|
184
|
+
|
|
185
|
+
### Events
|
|
186
|
+
|
|
187
|
+
| Name | Type | Description | Inherited From |
|
|
188
|
+
| --------- | ------------- | ----------- | -------------- |
|
|
189
|
+
| `trigger` | `CustomEvent` | | |
|
|
190
|
+
| `toggle` | `CustomEvent` | | |
|
|
191
|
+
|
|
192
|
+
### Attributes
|
|
193
|
+
|
|
194
|
+
| Name | Field | Inherited From |
|
|
195
|
+
| -------------------- | ----------------- | -------------- |
|
|
196
|
+
| `label` | label | |
|
|
197
|
+
| `disabled` | disabled | |
|
|
198
|
+
| `open` | open | |
|
|
199
|
+
| `appearance` | appearance | |
|
|
200
|
+
| `appearance-variant` | appearanceVariant | |
|
|
201
|
+
|
|
202
|
+
<hr/>
|
|
203
|
+
|
|
204
|
+
## class: `FvSplitButtonAnchor`
|
|
205
|
+
|
|
206
|
+
### Superclass
|
|
207
|
+
|
|
208
|
+
| Name | Module | Package |
|
|
209
|
+
| ------------------- | ------ | ------------------- |
|
|
210
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
211
|
+
|
|
212
|
+
### Fields
|
|
213
|
+
|
|
214
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
215
|
+
| ------------------- | ------- | ------------------------------------------ | -------------------- | ----------- | -------------- |
|
|
216
|
+
| `label` | public | `string` | `'Primary function'` | | |
|
|
217
|
+
| `href` | public | `string` | `''` | | |
|
|
218
|
+
| `target` | public | `string` | `''` | | |
|
|
219
|
+
| `rel` | public | `string` | `''` | | |
|
|
220
|
+
| `download` | public | `string` | `''` | | |
|
|
221
|
+
| `disabled` | public | `boolean` | `false` | | |
|
|
222
|
+
| `open` | public | `boolean` | `false` | | |
|
|
223
|
+
| `appearance` | public | `FvSplitButtonAnchorAppearanceType` | | | |
|
|
224
|
+
| `appearanceVariant` | public | `FvSplitButtonAnchorAppearanceVariantType` | | | |
|
|
225
|
+
|
|
226
|
+
### Events
|
|
227
|
+
|
|
228
|
+
| Name | Type | Description | Inherited From |
|
|
229
|
+
| --------- | ------------- | ----------- | -------------- |
|
|
230
|
+
| `trigger` | `CustomEvent` | | |
|
|
231
|
+
| `toggle` | `CustomEvent` | | |
|
|
232
|
+
|
|
233
|
+
### Attributes
|
|
234
|
+
|
|
235
|
+
| Name | Field | Inherited From |
|
|
236
|
+
| -------------------- | ----------------- | -------------- |
|
|
237
|
+
| `label` | label | |
|
|
238
|
+
| `href` | href | |
|
|
239
|
+
| `target` | target | |
|
|
240
|
+
| `rel` | rel | |
|
|
241
|
+
| `download` | download | |
|
|
242
|
+
| `disabled` | disabled | |
|
|
243
|
+
| `open` | open | |
|
|
244
|
+
| `appearance` | appearance | |
|
|
245
|
+
| `appearance-variant` | appearanceVariant | |
|
|
246
|
+
|
|
247
|
+
<hr/>
|
|
248
|
+
|
|
249
|
+
## class: `FvSummaryPanel`
|
|
250
|
+
|
|
251
|
+
### Superclass
|
|
252
|
+
|
|
253
|
+
| Name | Module | Package |
|
|
254
|
+
| ------------------- | ------ | ------------------- |
|
|
255
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
256
|
+
|
|
257
|
+
### Fields
|
|
258
|
+
|
|
259
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
260
|
+
| ---------------------- | ------- | --------- | ------------- | ----------- | -------------- |
|
|
261
|
+
| `showEditItemsButton` | public | `boolean` | `false` | | |
|
|
262
|
+
| `legacyStyle` | public | `boolean` | `false` | | |
|
|
263
|
+
| `editItemsButtonLabel` | public | `string` | `'Configure'` | | |
|
|
264
|
+
|
|
265
|
+
### Events
|
|
266
|
+
|
|
267
|
+
| Name | Type | Description | Inherited From |
|
|
268
|
+
| ------------ | ------------- | ----------- | -------------- |
|
|
269
|
+
| `edit-items` | `CustomEvent` | | |
|
|
270
|
+
|
|
271
|
+
### Attributes
|
|
272
|
+
|
|
273
|
+
| Name | Field | Inherited From |
|
|
274
|
+
| ------------------------- | -------------------- | -------------- |
|
|
275
|
+
| `show-edit-items-button` | showEditItemsButton | |
|
|
276
|
+
| `legacy-style` | legacyStyle | |
|
|
277
|
+
| `edit-items-button-label` | editItemsButtonLabel | |
|
|
278
|
+
|
|
279
|
+
<hr/>
|
|
280
|
+
|
|
281
|
+
## class: `FvSummaryPanelTile`
|
|
282
|
+
|
|
283
|
+
### Superclass
|
|
284
|
+
|
|
285
|
+
| Name | Module | Package |
|
|
286
|
+
| ------------------- | ------ | ------------------- |
|
|
287
|
+
| `FoundationElement` | | @ni/fast-foundation |
|
|
288
|
+
|
|
289
|
+
### Fields
|
|
290
|
+
|
|
291
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
292
|
+
| -------------- | ------- | ------------------------------------ | ------- | ----------- | -------------- |
|
|
293
|
+
| `count` | public | `string` | `''` | | |
|
|
294
|
+
| `label` | public | `string` | `''` | | |
|
|
295
|
+
| `legacyStyle` | public | `boolean` | `false` | | |
|
|
296
|
+
| `selected` | public | `boolean` | `false` | | |
|
|
297
|
+
| `textPosition` | public | `FvSummaryPanelTileTextPositionType` | | | |
|
|
298
|
+
|
|
299
|
+
### Attributes
|
|
300
|
+
|
|
301
|
+
| Name | Field | Inherited From |
|
|
302
|
+
| --------------- | ------------ | -------------- |
|
|
303
|
+
| `count` | count | |
|
|
304
|
+
| `label` | label | |
|
|
305
|
+
| `legacy-style` | legacyStyle | |
|
|
306
|
+
| `selected` | selected | |
|
|
307
|
+
| `text-position` | textPosition | |
|
|
308
|
+
|
|
309
|
+
<hr/>
|
|
310
|
+
|
|
78
311
|
## class: `TsIconDynamic`
|
|
79
312
|
|
|
80
313
|
### Superclass
|
|
@@ -13,6 +13,7 @@ export declare class FvAccordionItem extends FoundationElement {
|
|
|
13
13
|
header: string;
|
|
14
14
|
expanded: boolean;
|
|
15
15
|
appearance: FvAccordionItemAppearance;
|
|
16
|
+
/** @internal */
|
|
16
17
|
handleToggle(event: Event): boolean;
|
|
17
18
|
}
|
|
18
19
|
export declare const fvAccordionItemTag = "ok-fv-accordion-item";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/fv/accordion-item/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAQpD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,iBAAiB;IAAtD;;QAEW,WAAM,GAAG,EAAE,CAAC;QAGZ,aAAQ,GAAG,KAAK,CAAC;QAGjB,eAAU,GAA8B,yBAAyB,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/fv/accordion-item/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAQpD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,iBAAiB;IAAtD;;QAEW,WAAM,GAAG,EAAE,CAAC;QAGZ,aAAQ,GAAG,KAAK,CAAC;QAGjB,eAAU,GAA8B,yBAAyB,CAAC,KAAK,CAAC;IAOnF,CAAC;IALG,gBAAgB;IACT,YAAY,CAAC,KAAY;QAC5B,IAAI,CAAC,QAAQ,GAAI,KAAK,CAAC,MAA6B,CAAC,IAAI,CAAC;QAC1D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAbU;IADN,IAAI;+CACc;AAGZ;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;iDACF;AAGjB;IADN,IAAI,EAAE;mDACwE;AASnF,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC;IAC9C,QAAQ,EAAE,mBAAmB;IAC7B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,IAAI,CAAC;KAChB,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC","sourcesContent":["import { attr } from '@ni/fast-element';\nimport { DesignSystem, FoundationElement } from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\nimport { FvAccordionItemAppearance } from './types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ok-fv-accordion-item': FvAccordionItem;\n }\n}\n\n/**\n * An accordion item component that can be expanded or collapsed to\n * show or hide its content.\n */\nexport class FvAccordionItem extends FoundationElement {\n @attr\n public header = '';\n\n @attr({ mode: 'boolean' })\n public expanded = false;\n\n @attr()\n public appearance: FvAccordionItemAppearance = FvAccordionItemAppearance.ghost;\n\n /** @internal */\n public handleToggle(event: Event): boolean {\n this.expanded = (event.target as HTMLDetailsElement).open;\n return true;\n }\n}\n\nconst okFvAccordionItem = FvAccordionItem.compose({\n baseName: 'fv-accordion-item',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('ok')\n .register(okFvAccordionItem());\nexport const fvAccordionItemTag = 'ok-fv-accordion-item';\n"]}
|
|
@@ -8,7 +8,12 @@ export class FvAccordionItemPageObject {
|
|
|
8
8
|
this.accordionItemElement = accordionItemElement;
|
|
9
9
|
}
|
|
10
10
|
async clickSummary() {
|
|
11
|
+
const details = this.getDetails();
|
|
12
|
+
const togglePromise = new Promise(resolve => {
|
|
13
|
+
details.addEventListener('toggle', () => resolve(), { once: true });
|
|
14
|
+
});
|
|
11
15
|
this.getSummary().click();
|
|
16
|
+
await togglePromise;
|
|
12
17
|
await waitForUpdatesAsync();
|
|
13
18
|
}
|
|
14
19
|
getHeaderText() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fv-accordion-item.pageobject.js","sourceRoot":"","sources":["../../../../../src/fv/accordion-item/testing/fv-accordion-item.pageobject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAG3F;;;GAGG;AACH,MAAM,OAAO,yBAAyB;IAClC,YAAsC,oBAAqC;QAArC,yBAAoB,GAApB,oBAAoB,CAAiB;IAAG,CAAC;IAExE,KAAK,CAAC,YAAY;QACrB,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;QAC1B,MAAM,mBAAmB,EAAE,CAAC;IAChC,CAAC;IAEM,aAAa;QAChB,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC;IAEM,UAAU;QACb,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC;IAClC,CAAC;IAEM,cAAc;QACjB,OAAO,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;IAEM,eAAe;QAClB,OAAO,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,aAAa,CACxD,kCAAkC,CACrC,CAAC;IACN,CAAC;IAEO,UAAU;QACd,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;QAC/E,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAEO,UAAU;QACd,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,aAAa,CAC/D,yBAAyB,CAC5B,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAEO,QAAQ;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,aAAa,CAC7D,uBAAuB,CAC1B,CAAC;QACF,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["import { waitForUpdatesAsync } from '@ni/nimble-components/dist/esm/testing/async-helpers';\nimport type { FvAccordionItem } from '..';\n\n/**\n * Page object for the `ok-fv-accordion-item` component to provide consistent\n * ways of querying and interacting with the component during tests.\n */\nexport class FvAccordionItemPageObject {\n public constructor(protected readonly accordionItemElement: FvAccordionItem) {}\n\n public async clickSummary(): Promise<void> {\n this.getSummary().click();\n await waitForUpdatesAsync();\n }\n\n public getHeaderText(): string {\n return this.getTitle().textContent?.trim() ?? '';\n }\n\n public isExpanded(): boolean {\n return this.getDetails().open;\n }\n\n public hasContentSlot(): boolean {\n return !!this.accordionItemElement.shadowRoot?.querySelector('slot');\n }\n\n public hasExpanderIcon(): boolean {\n return !!this.accordionItemElement.shadowRoot?.querySelector(\n 'nimble-icon-arrow-expander-right'\n );\n }\n\n private getDetails(): HTMLDetailsElement {\n const details = this.accordionItemElement.shadowRoot?.querySelector('details');\n if (!details) {\n throw new Error('Accordion item details element not found');\n }\n return details;\n }\n\n private getSummary(): HTMLElement {\n const summary = this.accordionItemElement.shadowRoot?.querySelector<HTMLElement>(\n '.accordion-item-summary'\n );\n if (!summary) {\n throw new Error('Accordion item summary element not found');\n }\n return summary;\n }\n\n private getTitle(): HTMLElement {\n const title = this.accordionItemElement.shadowRoot?.querySelector<HTMLElement>(\n '.accordion-item-title'\n );\n if (!title) {\n throw new Error('Accordion item title element not found');\n }\n return title;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"fv-accordion-item.pageobject.js","sourceRoot":"","sources":["../../../../../src/fv/accordion-item/testing/fv-accordion-item.pageobject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAG3F;;;GAGG;AACH,MAAM,OAAO,yBAAyB;IAClC,YAAsC,oBAAqC;QAArC,yBAAoB,GAApB,oBAAoB,CAAiB;IAAG,CAAC;IAExE,KAAK,CAAC,YAAY;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;YAC9C,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAA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":["import { waitForUpdatesAsync } from '@ni/nimble-components/dist/esm/testing/async-helpers';\nimport type { FvAccordionItem } from '..';\n\n/**\n * Page object for the `ok-fv-accordion-item` component to provide consistent\n * ways of querying and interacting with the component during tests.\n */\nexport class FvAccordionItemPageObject {\n public constructor(protected readonly accordionItemElement: FvAccordionItem) {}\n\n public async clickSummary(): Promise<void> {\n const details = this.getDetails();\n const togglePromise = new Promise<void>(resolve => {\n details.addEventListener('toggle', () => resolve(), { once: true });\n });\n\n this.getSummary().click();\n await togglePromise;\n await waitForUpdatesAsync();\n }\n\n public getHeaderText(): string {\n return this.getTitle().textContent?.trim() ?? '';\n }\n\n public isExpanded(): boolean {\n return this.getDetails().open;\n }\n\n public hasContentSlot(): boolean {\n return !!this.accordionItemElement.shadowRoot?.querySelector('slot');\n }\n\n public hasExpanderIcon(): boolean {\n return !!this.accordionItemElement.shadowRoot?.querySelector(\n 'nimble-icon-arrow-expander-right'\n );\n }\n\n private getDetails(): HTMLDetailsElement {\n const details = this.accordionItemElement.shadowRoot?.querySelector('details');\n if (!details) {\n throw new Error('Accordion item details element not found');\n }\n return details;\n }\n\n private getSummary(): HTMLElement {\n const summary = this.accordionItemElement.shadowRoot?.querySelector<HTMLElement>(\n '.accordion-item-summary'\n );\n if (!summary) {\n throw new Error('Accordion item summary element not found');\n }\n return summary;\n }\n\n private getTitle(): HTMLElement {\n const title = this.accordionItemElement.shadowRoot?.querySelector<HTMLElement>(\n '.accordion-item-title'\n );\n if (!title) {\n throw new Error('Accordion item title element not found');\n }\n return title;\n }\n}\n"]}
|
package/dist/esm/fv/all-fv.d.ts
CHANGED
package/dist/esm/fv/all-fv.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import './accordion-item';
|
|
2
|
+
import './card';
|
|
3
|
+
import './chip-selector';
|
|
4
|
+
import './context-help';
|
|
5
|
+
import './split-button';
|
|
6
|
+
import './split-button-anchor';
|
|
7
|
+
import './summary-panel';
|
|
8
|
+
import './summary-panel-tile';
|
|
2
9
|
import './search-input';
|
|
3
10
|
//# sourceMappingURL=all-fv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-fv.js","sourceRoot":"","sources":["../../../src/fv/all-fv.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC","sourcesContent":["import './accordion-item';\nimport './search-input';\n"]}
|
|
1
|
+
{"version":3,"file":"all-fv.js","sourceRoot":"","sources":["../../../src/fv/all-fv.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,QAAQ,CAAC;AAChB,OAAO,iBAAiB,CAAC;AACzB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iBAAiB,CAAC;AACzB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,CAAC","sourcesContent":["import './accordion-item';\nimport './card';\nimport './chip-selector';\nimport './context-help';\nimport './split-button';\nimport './split-button-anchor';\nimport './summary-panel';\nimport './summary-panel-tile';\nimport './search-input';\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { FoundationElement } from '@ni/fast-foundation';
|
|
2
|
+
import { type FvCardAppearance as FvCardAppearanceType, type FvCardInteractionMode as FvCardInteractionModeType } from './types';
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
'ok-fv-card': FvCard;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* An opinionated card component for FV layouts with optional media,
|
|
10
|
+
* badges, footer metadata, and action content.
|
|
11
|
+
*/
|
|
12
|
+
export declare class FvCard extends FoundationElement {
|
|
13
|
+
title: string;
|
|
14
|
+
subtitle: string;
|
|
15
|
+
description: string;
|
|
16
|
+
appearance: FvCardAppearanceType;
|
|
17
|
+
interactionMode: FvCardInteractionModeType;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
initials: string;
|
|
20
|
+
/** @internal */
|
|
21
|
+
hasIconContent: boolean;
|
|
22
|
+
/** @internal */
|
|
23
|
+
hasBadgesContent: boolean;
|
|
24
|
+
/** @internal */
|
|
25
|
+
hasDefaultContent: boolean;
|
|
26
|
+
/** @internal */
|
|
27
|
+
hasActionsContent: boolean;
|
|
28
|
+
/** @internal */
|
|
29
|
+
hasFooterStartContent: boolean;
|
|
30
|
+
/** @internal */
|
|
31
|
+
hasFooterEndContent: boolean;
|
|
32
|
+
/** @internal */
|
|
33
|
+
get showInitials(): boolean;
|
|
34
|
+
/** @internal */
|
|
35
|
+
get hasMedia(): boolean;
|
|
36
|
+
/** @internal */
|
|
37
|
+
get initialsText(): string;
|
|
38
|
+
/** @internal */
|
|
39
|
+
get showBody(): boolean;
|
|
40
|
+
/** @internal */
|
|
41
|
+
get showFooter(): boolean;
|
|
42
|
+
/** @internal */
|
|
43
|
+
get showActions(): boolean;
|
|
44
|
+
/** @internal */
|
|
45
|
+
get isCardInteractive(): boolean;
|
|
46
|
+
/** @internal */
|
|
47
|
+
handleIconSlotChange(event: Event): boolean;
|
|
48
|
+
/** @internal */
|
|
49
|
+
handleBadgesSlotChange(event: Event): boolean;
|
|
50
|
+
/** @internal */
|
|
51
|
+
handleDefaultSlotChange(event: Event): boolean;
|
|
52
|
+
/** @internal */
|
|
53
|
+
handleActionsSlotChange(event: Event): boolean;
|
|
54
|
+
/** @internal */
|
|
55
|
+
handleFooterStartSlotChange(event: Event): boolean;
|
|
56
|
+
/** @internal */
|
|
57
|
+
handleFooterEndSlotChange(event: Event): boolean;
|
|
58
|
+
}
|
|
59
|
+
export declare const fvCardTag = "ok-fv-card";
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr, observable } from '@ni/fast-element';
|
|
3
|
+
import { DesignSystem, FoundationElement } from '@ni/fast-foundation';
|
|
4
|
+
import { styles } from './styles';
|
|
5
|
+
import { template } from './template';
|
|
6
|
+
import { FvCardAppearance, FvCardInteractionMode } from './types';
|
|
7
|
+
function slotHasAssignedElements(slot) {
|
|
8
|
+
return slot.assignedElements({ flatten: true }).length > 0;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An opinionated card component for FV layouts with optional media,
|
|
12
|
+
* badges, footer metadata, and action content.
|
|
13
|
+
*/
|
|
14
|
+
export class FvCard extends FoundationElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.title = '';
|
|
18
|
+
this.subtitle = '';
|
|
19
|
+
this.description = '';
|
|
20
|
+
this.appearance = FvCardAppearance.outline;
|
|
21
|
+
this.interactionMode = FvCardInteractionMode.static;
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
this.initials = '';
|
|
24
|
+
/** @internal */
|
|
25
|
+
this.hasIconContent = false;
|
|
26
|
+
/** @internal */
|
|
27
|
+
this.hasBadgesContent = false;
|
|
28
|
+
/** @internal */
|
|
29
|
+
this.hasDefaultContent = false;
|
|
30
|
+
/** @internal */
|
|
31
|
+
this.hasActionsContent = false;
|
|
32
|
+
/** @internal */
|
|
33
|
+
this.hasFooterStartContent = false;
|
|
34
|
+
/** @internal */
|
|
35
|
+
this.hasFooterEndContent = false;
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
get showInitials() {
|
|
39
|
+
return !this.hasIconContent && this.initialsText.length > 0;
|
|
40
|
+
}
|
|
41
|
+
/** @internal */
|
|
42
|
+
get hasMedia() {
|
|
43
|
+
return this.hasIconContent || this.showInitials;
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
get initialsText() {
|
|
47
|
+
return this.initials.trim().slice(0, 2).toUpperCase();
|
|
48
|
+
}
|
|
49
|
+
/** @internal */
|
|
50
|
+
get showBody() {
|
|
51
|
+
return this.description.length > 0 || this.hasDefaultContent;
|
|
52
|
+
}
|
|
53
|
+
/** @internal */
|
|
54
|
+
get showFooter() {
|
|
55
|
+
return this.hasFooterStartContent || this.hasFooterEndContent;
|
|
56
|
+
}
|
|
57
|
+
/** @internal */
|
|
58
|
+
get showActions() {
|
|
59
|
+
return this.interactionMode === FvCardInteractionMode.static && this.hasActionsContent;
|
|
60
|
+
}
|
|
61
|
+
/** @internal */
|
|
62
|
+
get isCardInteractive() {
|
|
63
|
+
return this.interactionMode === FvCardInteractionMode.card;
|
|
64
|
+
}
|
|
65
|
+
/** @internal */
|
|
66
|
+
handleIconSlotChange(event) {
|
|
67
|
+
this.hasIconContent = slotHasAssignedElements(event.target);
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
/** @internal */
|
|
71
|
+
handleBadgesSlotChange(event) {
|
|
72
|
+
this.hasBadgesContent = slotHasAssignedElements(event.target);
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
/** @internal */
|
|
76
|
+
handleDefaultSlotChange(event) {
|
|
77
|
+
this.hasDefaultContent = slotHasAssignedElements(event.target);
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
/** @internal */
|
|
81
|
+
handleActionsSlotChange(event) {
|
|
82
|
+
this.hasActionsContent = slotHasAssignedElements(event.target);
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
/** @internal */
|
|
86
|
+
handleFooterStartSlotChange(event) {
|
|
87
|
+
this.hasFooterStartContent = slotHasAssignedElements(event.target);
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
/** @internal */
|
|
91
|
+
handleFooterEndSlotChange(event) {
|
|
92
|
+
this.hasFooterEndContent = slotHasAssignedElements(event.target);
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
__decorate([
|
|
97
|
+
attr({ attribute: 'card-title' })
|
|
98
|
+
], FvCard.prototype, "title", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
attr
|
|
101
|
+
], FvCard.prototype, "subtitle", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
attr
|
|
104
|
+
], FvCard.prototype, "description", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
attr
|
|
107
|
+
], FvCard.prototype, "appearance", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
attr({ attribute: 'interaction-mode' })
|
|
110
|
+
], FvCard.prototype, "interactionMode", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
attr({ mode: 'boolean' })
|
|
113
|
+
], FvCard.prototype, "disabled", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
attr
|
|
116
|
+
], FvCard.prototype, "initials", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
observable
|
|
119
|
+
], FvCard.prototype, "hasIconContent", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
observable
|
|
122
|
+
], FvCard.prototype, "hasBadgesContent", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
observable
|
|
125
|
+
], FvCard.prototype, "hasDefaultContent", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
observable
|
|
128
|
+
], FvCard.prototype, "hasActionsContent", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
observable
|
|
131
|
+
], FvCard.prototype, "hasFooterStartContent", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
observable
|
|
134
|
+
], FvCard.prototype, "hasFooterEndContent", void 0);
|
|
135
|
+
const okFvCard = FvCard.compose({
|
|
136
|
+
baseName: 'fv-card',
|
|
137
|
+
template,
|
|
138
|
+
styles
|
|
139
|
+
});
|
|
140
|
+
DesignSystem.getOrCreate()
|
|
141
|
+
.withPrefix('ok')
|
|
142
|
+
.register(okFvCard());
|
|
143
|
+
export const fvCardTag = 'ok-fv-card';
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/fv/card/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAA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AED,gBAAgB;IACT,2BAA2B,CAAC,KAAY;QAC3C,IAAI,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,KAAK,CAAC,MAAyB,CAAC,CAAC;QACtF,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB;IACT,yBAAyB,CAAC,KAAY;QACzC,IAAI,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,KAAK,CAAC,MAAyB,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAlHmB;IADf,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;qCACP;AAGpB;IADN,IAAI;wCACgB;AAGd;IADN,IAAI;2CACmB;AAGjB;IADN,IAAI;0CAC8D;AAG5D;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;+CACyC;AAG1E;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;wCACF;AAGjB;IADN,IAAI;wCACgB;AAId;IADN,UAAU;8CACmB;AAIvB;IADN,UAAU;gDACqB;AAIzB;IADN,UAAU;iDACsB;AAI1B;IADN,UAAU;iDACsB;AAI1B;IADN,UAAU;qDAC0B;AAI9B;IADN,UAAU;mDACwB;AA0EvC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;IAC5B,QAAQ,EAAE,SAAS;IACnB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,IAAI,CAAC;KAChB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC1B,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC","sourcesContent":["import { attr, observable } from '@ni/fast-element';\nimport { DesignSystem, FoundationElement } from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\nimport {\n FvCardAppearance,\n type FvCardAppearance as FvCardAppearanceType,\n FvCardInteractionMode,\n type FvCardInteractionMode as FvCardInteractionModeType\n} from './types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ok-fv-card': FvCard;\n }\n}\n\nfunction slotHasAssignedElements(slot: HTMLSlotElement): boolean {\n return slot.assignedElements({ flatten: true }).length > 0;\n}\n\n/**\n * An opinionated card component for FV layouts with optional media,\n * badges, footer metadata, and action content.\n */\nexport class FvCard extends FoundationElement {\n @attr({ attribute: 'card-title' })\n public override title = '';\n\n @attr\n public subtitle = '';\n\n @attr\n public description = '';\n\n @attr\n public appearance: FvCardAppearanceType = FvCardAppearance.outline;\n\n @attr({ attribute: 'interaction-mode' })\n public interactionMode: FvCardInteractionModeType = FvCardInteractionMode.static;\n\n @attr({ mode: 'boolean' })\n public disabled = false;\n\n @attr\n public initials = '';\n\n /** @internal */\n @observable\n public hasIconContent = false;\n\n /** @internal */\n @observable\n public hasBadgesContent = false;\n\n /** @internal */\n @observable\n public hasDefaultContent = false;\n\n /** @internal */\n @observable\n public hasActionsContent = false;\n\n /** @internal */\n @observable\n public hasFooterStartContent = false;\n\n /** @internal */\n @observable\n public hasFooterEndContent = false;\n\n /** @internal */\n public get showInitials(): boolean {\n return !this.hasIconContent && this.initialsText.length > 0;\n }\n\n /** @internal */\n public get hasMedia(): boolean {\n return this.hasIconContent || this.showInitials;\n }\n\n /** @internal */\n public get initialsText(): string {\n return this.initials.trim().slice(0, 2).toUpperCase();\n }\n\n /** @internal */\n public get showBody(): boolean {\n return this.description.length > 0 || this.hasDefaultContent;\n }\n\n /** @internal */\n public get showFooter(): boolean {\n return this.hasFooterStartContent || this.hasFooterEndContent;\n }\n\n /** @internal */\n public get showActions(): boolean {\n return this.interactionMode === FvCardInteractionMode.static && this.hasActionsContent;\n }\n\n /** @internal */\n public get isCardInteractive(): boolean {\n return this.interactionMode === FvCardInteractionMode.card;\n }\n\n /** @internal */\n public handleIconSlotChange(event: Event): boolean {\n this.hasIconContent = slotHasAssignedElements(event.target as HTMLSlotElement);\n return true;\n }\n\n /** @internal */\n public handleBadgesSlotChange(event: Event): boolean {\n this.hasBadgesContent = slotHasAssignedElements(event.target as HTMLSlotElement);\n return true;\n }\n\n /** @internal */\n public handleDefaultSlotChange(event: Event): boolean {\n this.hasDefaultContent = slotHasAssignedElements(event.target as HTMLSlotElement);\n return true;\n }\n\n /** @internal */\n public handleActionsSlotChange(event: Event): boolean {\n this.hasActionsContent = slotHasAssignedElements(event.target as HTMLSlotElement);\n return true;\n }\n\n /** @internal */\n public handleFooterStartSlotChange(event: Event): boolean {\n this.hasFooterStartContent = slotHasAssignedElements(event.target as HTMLSlotElement);\n return true;\n }\n\n /** @internal */\n public handleFooterEndSlotChange(event: Event): boolean {\n this.hasFooterEndContent = slotHasAssignedElements(event.target as HTMLSlotElement);\n return true;\n }\n}\n\nconst okFvCard = FvCard.compose({\n baseName: 'fv-card',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('ok')\n .register(okFvCard());\nexport const fvCardTag = 'ok-fv-card';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@ni/fast-element").ElementStyles;
|