@ticatec/uniface-element 0.2.0 → 0.2.2
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/README.md +320 -1
- package/README_CN.md +392 -0
- package/dist/accordion/Accordion.svelte +1 -1
- package/dist/action-bar/ActionBar.svelte +7 -1
- package/dist/attachment-files/FileRender.svelte +1 -1
- package/dist/attachment-files/FileUploadBar.svelte +7 -6
- package/dist/attachment-files/FileUploadPanel.svelte +2 -2
- package/dist/base-calendar/DateContext.js +5 -4
- package/dist/base-calendar/YearPickupPanel.svelte +4 -4
- package/dist/card/Card.svelte +1 -1
- package/dist/card/Card.svelte.d.ts +1 -1
- package/dist/cascade-options-select/CascadeOptionSelect.svelte +2 -3
- package/dist/cascade-options-select/CascadeOptionSelect.svelte.d.ts +46 -1
- package/dist/cascade-options-select/CascadePanel.svelte +1 -1
- package/dist/checkbox/CheckBox.svelte +1 -1
- package/dist/color-picker/ColorPicker.svelte +9 -9
- package/dist/color-picker/ColorPicker.svelte.d.ts +0 -2
- package/dist/color-picker/ColorPickerPanel.svelte +11 -15
- package/dist/color-picker/ColorPickerPanel.svelte.d.ts +1 -1
- package/dist/common/CommonPicker.svelte +2 -2
- package/dist/common/CommonPicker.svelte.d.ts +1 -1
- package/dist/common/MouseClickHandler.d.ts +1 -1
- package/dist/common/Popover.svelte +28 -6
- package/dist/common/Popover.svelte.d.ts +9 -3
- package/dist/common/uniface-utils.js +6 -4
- package/dist/common-editor/CommonEditor.svelte +1 -1
- package/dist/common-editor/CommonEditor.svelte.d.ts +1 -1
- package/dist/common-editor/NumberInput.svelte +1 -1
- package/dist/common-editor/NumberInput.svelte.d.ts +1 -1
- package/dist/concise-data-table/ConciseListTable.svelte +7 -2
- package/dist/concise-data-table/ConciseListTable.svelte.d.ts +1 -0
- package/dist/concise-data-table/DataRow.svelte +1 -1
- package/dist/concise-data-table/TableOptions.d.ts +1 -1
- package/dist/data-table/DataTable.svelte +1 -1
- package/dist/data-table/parts/ActionsPanel.svelte +4 -3
- package/dist/data-table/parts/ActionsRow.svelte +3 -3
- package/dist/data-table/parts/ContentPanel.svelte +3 -2
- package/dist/data-table/parts/FixedColumnsPanel.svelte +0 -1
- package/dist/data-table/parts/FixedColumnsPanel.svelte.d.ts +1 -2
- package/dist/data-table/parts/FixedHeaderPanel.svelte +2 -2
- package/dist/data-table/parts/FixedRow.svelte +2 -1
- package/dist/data-table/parts/FixedRow.svelte.d.ts +1 -1
- package/dist/data-table/parts/HrefCell.svelte +23 -2
- package/dist/data-table/parts/PopupMenu.svelte +25 -2
- package/dist/data-table/parts/PopupMenu.svelte.d.ts +8 -1
- package/dist/date-picker/DatePicker.svelte +0 -1
- package/dist/date-picker/DateTimePicker.svelte +3 -3
- package/dist/date-picker/ScrollBar.svelte +4 -7
- package/dist/date-range/DateRangeEditor.svelte +1 -1
- package/dist/dialog/CommonDialog.svelte +8 -5
- package/dist/dialog/CommonDialog.svelte.d.ts +2 -1
- package/dist/dialog/Dialog.svelte +37 -12
- package/dist/dialog/Dialog.svelte.d.ts +4 -3
- package/dist/dialog/DialogBoard.svelte +11 -8
- package/dist/dialog/DialogWrapper.svelte +10 -0
- package/dist/{common-editor/DateInput.svelte.d.ts → dialog/DialogWrapper.svelte.d.ts} +6 -13
- package/dist/dialog/Dialogs.js +1 -1
- package/dist/dialog/ModalResult.d.ts +5 -0
- package/dist/dialog/ModalResult.js +5 -0
- package/dist/drawer/Drawer.svelte +1 -1
- package/dist/form-field/FormField.svelte +2 -1
- package/dist/form-field/FormField.svelte.d.ts +1 -0
- package/dist/form-panel/flex-row-form/FormContainer.svelte +1 -1
- package/dist/form-panel/grid-form/EmptyCell.svelte +8 -7
- package/dist/form-panel/grid-form/EmptyCell.svelte.d.ts +2 -2
- package/dist/form-panel/grid-form/GridField.svelte +1 -1
- package/dist/i18nRes/i18nRes.d.ts +2 -0
- package/dist/i18nRes/i18nRes.js +44 -0
- package/dist/i18nRes/index.d.ts +2 -0
- package/dist/i18nRes/index.js +2 -0
- package/dist/image-files/ImageFilesField.svelte +1 -1
- package/dist/indicator/IndicatorBoard.svelte +1 -1
- package/dist/inline-cell-editor/InvalidEditor.svelte +1 -0
- package/dist/input-options-select/InputOptionsSelect.svelte +6 -6
- package/dist/input-options-select/InputOptionsSelect.svelte.d.ts +1 -1
- package/dist/layout/flex/FlexBlock.svelte +1 -1
- package/dist/lookup-editor/LookupEditor.svelte +1 -1
- package/dist/memo-editor/MemoEditor.svelte +2 -2
- package/dist/message-box/IMessageBox.d.ts +2 -4
- package/dist/message-box/IMessageBox.js +4 -6
- package/dist/message-box/MessageBoxBoard.svelte +1 -3
- package/dist/options-multi-select/OptionsMultiSelect.svelte +1 -1
- package/dist/prompts-text-editor/PromptsTextEditor.svelte +2 -2
- package/dist/prompts-text-editor/PromptsTextEditor.svelte.d.ts +1 -1
- package/dist/property-editor/PropertyEditor.svelte +3 -3
- package/dist/text-editor/PasswordEditor.svelte +1 -1
- package/dist/transfer/Transfer.svelte +17 -12
- package/dist/transfer/Transfer.svelte.d.ts +0 -1
- package/dist/unit-number-editor/UnitNumberEditor.svelte +2 -2
- package/docs/buttons/cn/ActionBar.md +459 -0
- package/docs/buttons/cn/Button.md +228 -0
- package/docs/buttons/cn/IconButton.md +294 -0
- package/docs/buttons/cn/README.md +600 -0
- package/docs/buttons/cn/TextButton.md +163 -0
- package/docs/buttons/en/ActionBar.md +459 -0
- package/docs/buttons/en/Button.md +228 -0
- package/docs/buttons/en/IconButton.md +294 -0
- package/docs/buttons/en/README.md +600 -0
- package/docs/buttons/en/TextButton.md +163 -0
- package/docs/containers/cn/accordion.md +622 -0
- package/docs/containers/cn/box.md +445 -0
- package/docs/containers/cn/card.md +404 -0
- package/docs/containers/cn/page.md +576 -0
- package/docs/containers/cn/tabs.md +686 -0
- package/docs/containers/en/accordion.md +622 -0
- package/docs/containers/en/box.md +445 -0
- package/docs/containers/en/card.md +404 -0
- package/docs/containers/en/page.md +576 -0
- package/docs/containers/en/tabs.md +686 -0
- package/docs/data-display/cn/concise-data-table.md +731 -0
- package/docs/data-display/cn/listbox.md +786 -0
- package/docs/data-display/cn/treeview.md +863 -0
- package/docs/data-display/en/concise-data-table.md +732 -0
- package/docs/data-display/en/listbox.md +786 -0
- package/docs/data-display/en/treeview.md +863 -0
- package/docs/data-table/cn/README.md +596 -0
- package/docs/data-table/en/README.md +596 -0
- package/docs/dialog/cn/README.md +767 -0
- package/docs/dialog/en/README.md +767 -0
- package/docs/form/cn/README.md +847 -0
- package/docs/form/en/README.md +847 -0
- package/docs/form-components/cn/README.md +495 -0
- package/docs/form-components/cn/attachmentfilesfield.md +757 -0
- package/docs/form-components/cn/cascade-options-select.md +374 -0
- package/docs/form-components/cn/checkbox.md +58 -0
- package/docs/form-components/cn/date-picker.md +138 -0
- package/docs/form-components/cn/datetime-picker.md +228 -0
- package/docs/form-components/cn/group-checkbox.md +405 -0
- package/docs/form-components/cn/group-radiobox.md +525 -0
- package/docs/form-components/cn/imagefilesfield.md +651 -0
- package/docs/form-components/cn/input-options-select.md +250 -0
- package/docs/form-components/cn/lookup-editor.md +406 -0
- package/docs/form-components/cn/memoeditor.md +409 -0
- package/docs/form-components/cn/number-editor.md +261 -0
- package/docs/form-components/cn/options-multi-select.md +177 -0
- package/docs/form-components/cn/options-select.md +83 -0
- package/docs/form-components/cn/passwordeditor.md +538 -0
- package/docs/form-components/cn/prompts-text-editor.md +241 -0
- package/docs/form-components/cn/radiobutton.md +84 -0
- package/docs/form-components/cn/switch.md +178 -0
- package/docs/form-components/cn/text-editor.md +142 -0
- package/docs/form-components/cn/time-editor.md +159 -0
- package/docs/form-components/cn/unit-number-editor.md +164 -0
- package/docs/form-components/en/README.md +463 -0
- package/docs/form-components/en/attachmentfilesfield.md +757 -0
- package/docs/form-components/en/cascade-options-select.md +358 -0
- package/docs/form-components/en/checkbox.md +59 -0
- package/docs/form-components/en/date-picker.md +138 -0
- package/docs/form-components/en/datetime-picker.md +228 -0
- package/docs/form-components/en/group-checkbox.md +395 -0
- package/docs/form-components/en/group-radiobox.md +498 -0
- package/docs/form-components/en/imagefilesfield.md +651 -0
- package/docs/form-components/en/input-options-select.md +239 -0
- package/docs/form-components/en/lookup-editor.md +389 -0
- package/docs/form-components/en/memoeditor.md +409 -0
- package/docs/form-components/en/number-editor.md +249 -0
- package/docs/form-components/en/options-multi-select.md +177 -0
- package/docs/form-components/en/options-select.md +83 -0
- package/docs/form-components/en/passwordeditor.md +538 -0
- package/docs/form-components/en/prompts-text-editor.md +241 -0
- package/docs/form-components/en/radiobutton.md +84 -0
- package/docs/form-components/en/switch.md +180 -0
- package/docs/form-components/en/text-editor.md +142 -0
- package/docs/form-components/en/time-editor.md +159 -0
- package/docs/form-components/en/unit-number-editor.md +164 -0
- package/docs/form-layout/cn/criteria-field.md +652 -0
- package/docs/form-layout/cn/flex-form.md +454 -0
- package/docs/form-layout/cn/flex-row-form.md +542 -0
- package/docs/form-layout/cn/form-field.md +923 -0
- package/docs/form-layout/cn/grid-form.md +676 -0
- package/docs/form-layout/en/criteria-field.md +652 -0
- package/docs/form-layout/en/flex-form.md +454 -0
- package/docs/form-layout/en/flex-row-form.md +542 -0
- package/docs/form-layout/en/form-field.md +923 -0
- package/docs/form-layout/en/grid-form.md +676 -0
- package/docs/global/cn/README.md +534 -0
- package/docs/global/en/README.md +534 -0
- package/docs/layout/cn/classiclayout.md +460 -0
- package/docs/layout/cn/headerlayout.md +524 -0
- package/docs/layout/cn/sidebarlayout.md +263 -0
- package/docs/layout/en/classiclayout.md +951 -0
- package/docs/layout/en/headerlayout.md +524 -0
- package/docs/layout/en/sidebarlayout.md +262 -0
- package/docs/misc/cn/README.md +1217 -0
- package/docs/misc/en/README.md +1217 -0
- package/docs/navigation/cn/breadcrumb.md +291 -0
- package/docs/navigation/cn/navigator.md +322 -0
- package/docs/navigation/cn/navigatormenu.md +512 -0
- package/docs/navigation/cn/progressbar.md +199 -0
- package/docs/navigation/cn/progressstepbar.md +299 -0
- package/docs/navigation/en/breadcrumb.md +291 -0
- package/docs/navigation/en/navigator.md +322 -0
- package/docs/navigation/en/navigatormenu.md +512 -0
- package/docs/navigation/en/progressbar.md +199 -0
- package/docs/navigation/en/progressstepbar.md +299 -0
- package/docs/search-filters/cn/daterange.md +1156 -0
- package/docs/search-filters/cn/numberrange.md +688 -0
- package/docs/search-filters/cn/searchbox.md +1582 -0
- package/docs/search-filters/en/daterange.md +1156 -0
- package/docs/search-filters/en/numberrange.md +688 -0
- package/docs/search-filters/en/searchbox.md +1582 -0
- package/package.json +53 -13
- package/dist/common-editor/DateInput.svelte +0 -27
- package/dist/i18n_resources/index.d.ts +0 -3
- package/dist/i18n_resources/index.js +0 -3
- /package/dist/{i18n_resources → i18nRes}/uniface_cn_resource.d.ts +0 -0
- /package/dist/{i18n_resources → i18nRes}/uniface_cn_resource.js +0 -0
- /package/dist/{i18n_resources → i18nRes}/uniface_en_resource.d.ts +0 -0
- /package/dist/{i18n_resources → i18nRes}/uniface_en_resource.js +0 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
# Card Component
|
|
2
|
+
|
|
3
|
+
A flexible and versatile card container component for displaying content with optional headers, actions, and styling variants.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Card component provides a structured way to display content within a container that can include a title, header bar, action buttons, and various visual styles. It's perfect for creating content cards, information panels, and interactive containers.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
13
|
+
import type { CardAction } from '@ticatec/uniface-element/Card';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Basic Usage
|
|
17
|
+
|
|
18
|
+
```svelte
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
21
|
+
|
|
22
|
+
let title = "Basic Card";
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<Card {title}>
|
|
26
|
+
<p>This is the card content area where you can place any content.</p>
|
|
27
|
+
</Card>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
| Property | Type | Default | Description |
|
|
33
|
+
|----------|------|---------|-------------|
|
|
34
|
+
| `style` | `string` | `""` | Custom CSS styles for the card |
|
|
35
|
+
| `title` | `string` | `null` | Card title (creates simple header) |
|
|
36
|
+
| `actions` | `Array<CardAction>` | `[]` | Action buttons for the card |
|
|
37
|
+
| `variant` | `'plain' \| '3d'` | `'plain'` | Visual style variant |
|
|
38
|
+
| `iconColor` | `string \| null` | `null` | Color for action icons |
|
|
39
|
+
| `data` | `any` | - | Data passed to action callbacks |
|
|
40
|
+
|
|
41
|
+
## Slots
|
|
42
|
+
|
|
43
|
+
| Slot | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `default` | Main content area of the card |
|
|
46
|
+
| `header-bar` | Custom header content (overrides title) |
|
|
47
|
+
| `action-bar` | Custom action bar (used when no actions array provided) |
|
|
48
|
+
|
|
49
|
+
## CardAction Interface
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
interface CardAction {
|
|
53
|
+
/**
|
|
54
|
+
* Icon font class name
|
|
55
|
+
*/
|
|
56
|
+
icon?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Direct image source
|
|
60
|
+
*/
|
|
61
|
+
img?: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Tooltip text on hover
|
|
65
|
+
*/
|
|
66
|
+
hint?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Whether the action is disabled
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Action callback function
|
|
75
|
+
*/
|
|
76
|
+
callback: ActionCallback;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type ActionCallback = (data: any) => void;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Usage Examples
|
|
83
|
+
|
|
84
|
+
### Basic Card with Title
|
|
85
|
+
|
|
86
|
+
```svelte
|
|
87
|
+
<script lang="ts">
|
|
88
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<Card title="User Information">
|
|
92
|
+
<div class="user-info">
|
|
93
|
+
<p><strong>Name:</strong> John Doe</p>
|
|
94
|
+
<p><strong>Email:</strong> john@example.com</p>
|
|
95
|
+
<p><strong>Role:</strong> Developer</p>
|
|
96
|
+
</div>
|
|
97
|
+
</Card>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Card with Actions
|
|
101
|
+
|
|
102
|
+
```svelte
|
|
103
|
+
<script lang="ts">
|
|
104
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
105
|
+
import type { CardAction } from '@ticatec/uniface-element/Card';
|
|
106
|
+
|
|
107
|
+
let userData = { id: 1, name: 'John Doe' };
|
|
108
|
+
|
|
109
|
+
let actions: CardAction[] = [
|
|
110
|
+
{
|
|
111
|
+
icon: 'edit',
|
|
112
|
+
hint: 'Edit user',
|
|
113
|
+
callback: (data) => console.log('Edit', data)
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
icon: 'delete',
|
|
117
|
+
hint: 'Delete user',
|
|
118
|
+
callback: (data) => console.log('Delete', data)
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
icon: 'share',
|
|
122
|
+
hint: 'Share user profile',
|
|
123
|
+
disabled: false,
|
|
124
|
+
callback: (data) => console.log('Share', data)
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<Card title="User Card" {actions} data={userData}>
|
|
130
|
+
<div class="user-profile">
|
|
131
|
+
<p>User profile content goes here...</p>
|
|
132
|
+
</div>
|
|
133
|
+
</Card>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 3D Style Card
|
|
137
|
+
|
|
138
|
+
```svelte
|
|
139
|
+
<script lang="ts">
|
|
140
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<Card title="3D Card" variant="3d">
|
|
144
|
+
<p>This card has a 3D shadow effect for enhanced visual appeal.</p>
|
|
145
|
+
</Card>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Card with Custom Header
|
|
149
|
+
|
|
150
|
+
```svelte
|
|
151
|
+
<script lang="ts">
|
|
152
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<Card>
|
|
156
|
+
<div slot="header-bar" class="custom-header">
|
|
157
|
+
<h3>Custom Header</h3>
|
|
158
|
+
<span class="status-badge">Active</span>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<div class="card-body">
|
|
162
|
+
<p>Content with custom header styling.</p>
|
|
163
|
+
</div>
|
|
164
|
+
</Card>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Card with Custom Action Bar
|
|
168
|
+
|
|
169
|
+
```svelte
|
|
170
|
+
<script lang="ts">
|
|
171
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
172
|
+
</script>
|
|
173
|
+
|
|
174
|
+
<Card title="Custom Actions">
|
|
175
|
+
<p>Card content goes here.</p>
|
|
176
|
+
|
|
177
|
+
<div slot="action-bar" class="custom-actions">
|
|
178
|
+
<button class="btn-primary">Save</button>
|
|
179
|
+
<button class="btn-secondary">Cancel</button>
|
|
180
|
+
</div>
|
|
181
|
+
</Card>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Advanced Card with All Features
|
|
185
|
+
|
|
186
|
+
```svelte
|
|
187
|
+
<script lang="ts">
|
|
188
|
+
import Card from '@ticatec/uniface-element/Card';
|
|
189
|
+
import type { CardAction } from '@ticatec/uniface-element/Card';
|
|
190
|
+
|
|
191
|
+
let projectData = {
|
|
192
|
+
id: 'proj-123',
|
|
193
|
+
name: 'Website Redesign',
|
|
194
|
+
status: 'In Progress'
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
let projectActions: CardAction[] = [
|
|
198
|
+
{
|
|
199
|
+
icon: 'visibility',
|
|
200
|
+
hint: 'View project details',
|
|
201
|
+
callback: (data) => viewProject(data)
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
icon: 'edit',
|
|
205
|
+
hint: 'Edit project',
|
|
206
|
+
callback: (data) => editProject(data)
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
icon: 'share',
|
|
210
|
+
hint: 'Share project',
|
|
211
|
+
callback: (data) => shareProject(data)
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
icon: 'archive',
|
|
215
|
+
hint: 'Archive project',
|
|
216
|
+
disabled: projectData.status === 'Archived',
|
|
217
|
+
callback: (data) => archiveProject(data)
|
|
218
|
+
}
|
|
219
|
+
];
|
|
220
|
+
|
|
221
|
+
function viewProject(data: any) {
|
|
222
|
+
console.log('Viewing project:', data);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function editProject(data: any) {
|
|
226
|
+
console.log('Editing project:', data);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function shareProject(data: any) {
|
|
230
|
+
console.log('Sharing project:', data);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function archiveProject(data: any) {
|
|
234
|
+
console.log('Archiving project:', data);
|
|
235
|
+
}
|
|
236
|
+
</script>
|
|
237
|
+
|
|
238
|
+
<Card
|
|
239
|
+
title="Project: {projectData.name}"
|
|
240
|
+
variant="3d"
|
|
241
|
+
actions={projectActions}
|
|
242
|
+
data={projectData}
|
|
243
|
+
iconColor="#007bff"
|
|
244
|
+
style="max-width: 400px; margin: 20px;"
|
|
245
|
+
>
|
|
246
|
+
<div class="project-details">
|
|
247
|
+
<div class="status-row">
|
|
248
|
+
<span class="label">Status:</span>
|
|
249
|
+
<span class="status status-{projectData.status.toLowerCase().replace(' ', '-')}">
|
|
250
|
+
{projectData.status}
|
|
251
|
+
</span>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="description">
|
|
254
|
+
<p>Complete redesign of the company website with modern UI/UX principles.</p>
|
|
255
|
+
</div>
|
|
256
|
+
<div class="progress">
|
|
257
|
+
<div class="progress-bar">
|
|
258
|
+
<div class="progress-fill" style="width: 65%"></div>
|
|
259
|
+
</div>
|
|
260
|
+
<span class="progress-text">65% Complete</span>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</Card>
|
|
264
|
+
|
|
265
|
+
<style>
|
|
266
|
+
.project-details {
|
|
267
|
+
padding: 16px 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.status-row {
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
margin-bottom: 12px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.label {
|
|
277
|
+
font-weight: 600;
|
|
278
|
+
margin-right: 8px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.status {
|
|
282
|
+
padding: 4px 8px;
|
|
283
|
+
border-radius: 4px;
|
|
284
|
+
font-size: 0.875rem;
|
|
285
|
+
font-weight: 500;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.status-in-progress {
|
|
289
|
+
background-color: #fff3cd;
|
|
290
|
+
color: #856404;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.description {
|
|
294
|
+
margin-bottom: 16px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.progress {
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
gap: 12px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.progress-bar {
|
|
304
|
+
flex: 1;
|
|
305
|
+
height: 8px;
|
|
306
|
+
background-color: #e9ecef;
|
|
307
|
+
border-radius: 4px;
|
|
308
|
+
overflow: hidden;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.progress-fill {
|
|
312
|
+
height: 100%;
|
|
313
|
+
background-color: #007bff;
|
|
314
|
+
transition: width 0.3s ease;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.progress-text {
|
|
318
|
+
font-size: 0.875rem;
|
|
319
|
+
color: #6c757d;
|
|
320
|
+
white-space: nowrap;
|
|
321
|
+
}
|
|
322
|
+
</style>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Styling
|
|
326
|
+
|
|
327
|
+
The Card component uses the following CSS classes:
|
|
328
|
+
|
|
329
|
+
```css
|
|
330
|
+
.uniface-card {
|
|
331
|
+
/* Base card container */
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.uniface-card.shadowBox {
|
|
335
|
+
/* 3D variant with shadow */
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.card-header {
|
|
339
|
+
/* Header container */
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.card-header.simple {
|
|
343
|
+
/* Simple title header */
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.card-content {
|
|
347
|
+
/* Main content area */
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.card-action-bar {
|
|
351
|
+
/* Action bar container */
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## API Reference
|
|
356
|
+
|
|
357
|
+
### CardAction Interface
|
|
358
|
+
|
|
359
|
+
```typescript
|
|
360
|
+
interface CardAction {
|
|
361
|
+
/**
|
|
362
|
+
* Icon font class name (e.g., 'edit', 'delete')
|
|
363
|
+
*/
|
|
364
|
+
icon?: string;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Direct image source URL
|
|
368
|
+
*/
|
|
369
|
+
img?: string;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Tooltip text shown on hover
|
|
373
|
+
*/
|
|
374
|
+
hint?: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Whether the action button is disabled
|
|
378
|
+
*/
|
|
379
|
+
disabled?: boolean;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Callback function executed when action is clicked
|
|
383
|
+
*/
|
|
384
|
+
callback: ActionCallback;
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Type Definitions
|
|
389
|
+
|
|
390
|
+
```typescript
|
|
391
|
+
/**
|
|
392
|
+
* Action callback function
|
|
393
|
+
*/
|
|
394
|
+
export type ActionCallback = (data: any) => void;
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
## Best Practices
|
|
398
|
+
|
|
399
|
+
1. **Use descriptive titles** - Keep card titles concise but informative
|
|
400
|
+
2. **Limit actions** - Don't overwhelm users with too many action buttons
|
|
401
|
+
3. **Provide hints** - Always include helpful tooltip text for actions
|
|
402
|
+
4. **Handle disabled states** - Disable actions when they're not applicable
|
|
403
|
+
5. **Consistent styling** - Use the same variant across similar cards
|
|
404
|
+
6. **Responsive design** - Consider how cards will look on different screen sizes
|