@design-system-rte/angular 0.4.3 → 0.4.5
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/esm2022/design-system-rte-angular.mjs +5 -0
- package/esm2022/lib/components/button/button.component.mjs +26 -0
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +35 -0
- package/esm2022/lib/components/checkbox-group/checkbox-group.component.mjs +29 -0
- package/esm2022/lib/components/grid/col/col.directive.mjs +41 -0
- package/esm2022/lib/components/grid/grid.directive.mjs +30 -0
- package/esm2022/lib/components/icon/icon-map.mjs +303 -0
- package/esm2022/lib/components/icon/icon.component.mjs +39 -0
- package/esm2022/lib/components/icon/icon.service.mjs +33 -0
- package/esm2022/lib/components/link/link.component.mjs +20 -0
- package/esm2022/lib/components/radio-button/radio-button.component.mjs +24 -0
- package/esm2022/lib/components/radio-button-group/radio-button-group.component.mjs +29 -0
- package/esm2022/public-api.mjs +10 -0
- package/fesm2022/design-system-rte-angular.mjs +583 -0
- package/fesm2022/design-system-rte-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +17 -0
- package/lib/components/checkbox/checkbox.component.d.ts +18 -0
- package/lib/components/checkbox-group/checkbox-group.component.d.ts +18 -0
- package/lib/components/grid/col/col.directive.d.ts +14 -0
- package/lib/components/grid/grid.directive.d.ts +10 -0
- package/lib/components/icon/icon-map.d.ts +301 -0
- package/lib/components/icon/icon.component.d.ts +21 -0
- package/lib/components/icon/icon.service.d.ts +11 -0
- package/lib/components/link/link.component.d.ts +9 -0
- package/lib/components/radio-button/radio-button.component.d.ts +13 -0
- package/lib/components/radio-button-group/radio-button-group.component.d.ts +18 -0
- package/package.json +16 -2
- package/CHANGELOG.md +0 -19
- package/ng-package.json +0 -10
- package/src/lib/components/button/button.component.html +0 -10
- package/src/lib/components/button/button.component.scss +0 -154
- package/src/lib/components/button/button.component.spec.ts +0 -22
- package/src/lib/components/button/button.component.stories.ts +0 -99
- package/src/lib/components/button/button.component.ts +0 -28
- package/src/lib/components/checkbox/checkbox.component.html +0 -31
- package/src/lib/components/checkbox/checkbox.component.scss +0 -176
- package/src/lib/components/checkbox/checkbox.component.stories.ts +0 -126
- package/src/lib/components/checkbox/checkbox.component.ts +0 -34
- package/src/lib/components/checkbox-group/checkbox-group.component.html +0 -46
- package/src/lib/components/checkbox-group/checkbox-group.component.scss +0 -82
- package/src/lib/components/checkbox-group/checkbox-group.component.stories.ts +0 -121
- package/src/lib/components/checkbox-group/checkbox-group.component.ts +0 -28
- package/src/lib/components/grid/col/col.directive.ts +0 -35
- package/src/lib/components/grid/grid.directive.stories.ts +0 -150
- package/src/lib/components/grid/grid.directive.ts +0 -22
- package/src/lib/components/icon/icon-map.ts +0 -305
- package/src/lib/components/icon/icon.component.html +0 -1
- package/src/lib/components/icon/icon.component.scss +0 -3
- package/src/lib/components/icon/icon.component.ts +0 -58
- package/src/lib/components/icon/icon.service.ts +0 -33
- package/src/lib/components/icon/icon.stories.ts +0 -84
- package/src/lib/components/icon-button/icon-button.component.html +0 -16
- package/src/lib/components/icon-button/icon-button.component.scss +0 -165
- package/src/lib/components/icon-button/icon-button.component.ts +0 -40
- package/src/lib/components/icon-button/icon-button.stories.ts +0 -200
- package/src/lib/components/icon-button-toggle/icon-button-toggle.component.html +0 -12
- package/src/lib/components/icon-button-toggle/icon-button-toggle.component.ts +0 -36
- package/src/lib/components/icon-button-toggle/icon-button-toggle.stories.ts +0 -197
- package/src/lib/components/link/link.component.html +0 -6
- package/src/lib/components/link/link.component.scss +0 -108
- package/src/lib/components/link/link.component.stories.ts +0 -61
- package/src/lib/components/link/link.component.ts +0 -18
- package/src/lib/components/radio-button/radio-button.component.html +0 -24
- package/src/lib/components/radio-button/radio-button.component.scss +0 -135
- package/src/lib/components/radio-button/radio-button.component.stories.ts +0 -76
- package/src/lib/components/radio-button/radio-button.component.ts +0 -22
- package/src/lib/components/radio-button-group/radio-button-group.component.html +0 -45
- package/src/lib/components/radio-button-group/radio-button-group.component.scss +0 -82
- package/src/lib/components/radio-button-group/radio-button-group.component.stories.ts +0 -121
- package/src/lib/components/radio-button-group/radio-button-group.component.ts +0 -28
- package/src/lib/components/split-button/split-button.component.html +0 -56
- package/src/lib/components/split-button/split-button.component.scss +0 -288
- package/src/lib/components/split-button/split-button.component.stories.ts +0 -227
- package/src/lib/components/split-button/split-button.component.ts +0 -55
- package/src/lib/components/tooltip/tooltip.component.html +0 -7
- package/src/lib/components/tooltip/tooltip.component.scss +0 -116
- package/src/lib/components/tooltip/tooltip.component.ts +0 -16
- package/src/lib/components/tooltip/tooltip.directive.stories.ts +0 -218
- package/src/lib/components/tooltip/tooltip.directive.ts +0 -187
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/public-api.ts → public-api.d.ts} +0 -0
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { isValidIconName as isValidIconNameShared } from "@design-system-rte/core/components/icon/icon-utils";
|
|
2
|
-
|
|
3
|
-
export const togglableIcons = {
|
|
4
|
-
"add-circle": ["add_circle_outlined", "add_circle_filled"],
|
|
5
|
-
"admin-panel-settings": ["admin_panel_settings_outlined", "admin_panel_settings_filled"],
|
|
6
|
-
analytics: ["analytics_outlined", "analytics_filled"],
|
|
7
|
-
archive: ["archive_outlined", "archive_filled"],
|
|
8
|
-
"arrow-circle-chevron-down": ["arrow_circle_chevron_down_outlined", "arrow_circle_chevron_down_filled"],
|
|
9
|
-
"arrow-circle-chevron-left": ["arrow_circle_chevron_left_outlined", "arrow_circle_chevron_left_filled"],
|
|
10
|
-
"arrow-circle-chevron-right": ["arrow_circle_chevron_right_outlined", "arrow_circle_chevron_right_filled"],
|
|
11
|
-
"arrow-circle-chevron-up": ["arrow_circle_chevron_up_outlined", "arrow_circle_chevron_up_filled"],
|
|
12
|
-
"arrow-circle-down": ["arrow_circle_down_outlined", "arrow_circle_down_filled"],
|
|
13
|
-
"arrow-circle-left": ["arrow_circle_left_outlined", "arrow_circle_left_filled"],
|
|
14
|
-
"arrow-circle-right": ["arrow_circle_right_outlined", "arrow_circle_right_filled"],
|
|
15
|
-
"arrow-circle-up": ["arrow_circle_up_outlined", "arrow_circle_up_filled"],
|
|
16
|
-
article: ["article_outlined", "article_filled"],
|
|
17
|
-
"assignment-complete": ["assignment_complete_outlined", "assignment_complete_filled"],
|
|
18
|
-
assignment: ["assignment_outlined", "assignment_filled"],
|
|
19
|
-
"battery-alert": ["battery_alert_outlined", "battery_alert_filled"],
|
|
20
|
-
"battery-charging-full": ["battery_charging_full_outlined", "battery_charging_full_filled"],
|
|
21
|
-
"bolt-alt-circle": ["bolt_alt_circle_outlined", "bolt_alt_circle_filled"],
|
|
22
|
-
"bolt-alt": ["bolt_alt_outlined", "bolt_alt_filled"],
|
|
23
|
-
"bolt-circle": ["bolt_circle_outlined", "bolt_circle_filled"],
|
|
24
|
-
bolt: ["bolt_outlined", "bolt_filled"],
|
|
25
|
-
bookmark: ["bookmark_outlined", "bookmark_filled"],
|
|
26
|
-
bookmarks: ["bookmarks_outlined", "bookmarks_filled"],
|
|
27
|
-
build: ["build_outlined", "build_filled"],
|
|
28
|
-
"calendar-available": ["calendar_available_outlined", "calendar_available_filled"],
|
|
29
|
-
"calendar-busy": ["calendar_busy_outlined", "calendar_busy_filled"],
|
|
30
|
-
"calendar-month": ["calendar_month_outlined", "calendar_month_filled"],
|
|
31
|
-
"calendar-today": ["calendar_today_outlined", "calendar_today_filled"],
|
|
32
|
-
call: ["call_outlined", "call_filled"],
|
|
33
|
-
category: ["category_outlined", "category_filled"],
|
|
34
|
-
"chart-add": ["chart_add_outlined", "chart_add_filled"],
|
|
35
|
-
"chart-area": ["chart_area_outlined", "chart_area_filled"],
|
|
36
|
-
"chart-pie": ["chart_pie_outlined", "chart_pie_filled"],
|
|
37
|
-
"chart-table": ["chart_table_outlined", "chart_table_filled"],
|
|
38
|
-
"chat-alt": ["chat_alt_outlined", "chat_alt_filled"],
|
|
39
|
-
"chat-alt-unread": ["chat_alt_unread_outlined", "chat_alt_unread_filled"],
|
|
40
|
-
chat: ["chat_outlined", "chat_filled"],
|
|
41
|
-
"chat-unread": ["chat_unread_outlined", "chat_unread_filled"],
|
|
42
|
-
"check-circle": ["check_circle_outlined", "check_circle_filled"],
|
|
43
|
-
checkbox: ["checkbox_outlined", "checkbox_filled"],
|
|
44
|
-
"checkbox-indeterminate": ["checkbox_indeterminate_outlined", "checkbox_indeterminate_filled"],
|
|
45
|
-
clock: ["clock_outlined", "clock_filled"],
|
|
46
|
-
"cloud-download": ["cloud_download_outlined", "cloud_download_filled"],
|
|
47
|
-
cloud: ["cloud_outlined", "cloud_filled"],
|
|
48
|
-
"cloud-off": ["cloud_off_outlined", "cloud_off_filled"],
|
|
49
|
-
"cloud-upload": ["cloud_upload_outlined", "cloud_upload_filled"],
|
|
50
|
-
"comment-add": ["comment_add_outlined", "comment_add_filled"],
|
|
51
|
-
comment: ["comment_outlined", "comment_filled"],
|
|
52
|
-
copy: ["copy_outlined", "copy_filled"],
|
|
53
|
-
dangerous: ["dangerous_outlined", "dangerous_filled"],
|
|
54
|
-
dashboard: ["dashboard_outlined", "dashboard_filled"],
|
|
55
|
-
database: ["database_outlined", "database_filled"],
|
|
56
|
-
delete: ["delete_outlined", "delete_filled"],
|
|
57
|
-
desktop: ["desktop_outlined", "desktop_filled"],
|
|
58
|
-
devices: ["devices_outlined", "devices_filled"],
|
|
59
|
-
draft: ["draft_outlined", "draft_filled"],
|
|
60
|
-
eco: ["eco_outlined", "eco_filled"],
|
|
61
|
-
edit: ["edit_outlined", "edit_filled"],
|
|
62
|
-
"electric-meter": ["electric_meter_outlined", "electric_meter_filled"],
|
|
63
|
-
error: ["error_outlined", "error_filled"],
|
|
64
|
-
explore: ["explore_outlined", "explore_filled"],
|
|
65
|
-
"explore-off": ["explore_off_outlined", "explore_off_filled"],
|
|
66
|
-
"fast-forward": ["fast_forward_outlined", "fast_forward_filled"],
|
|
67
|
-
"fast-rewind": ["fast_rewind_outlined", "fast_rewind_filled"],
|
|
68
|
-
feedback: ["feedback_outlined", "feedback_filled"],
|
|
69
|
-
"file-copy": ["file_copy_outlined", "file_copy_filled"],
|
|
70
|
-
"file-download": ["file_download_outlined", "file_download_filled"],
|
|
71
|
-
"file-upload": ["file_upload_outlined", "file_upload_filled"],
|
|
72
|
-
"filter-alt": ["filter_alt_outlined", "filter_alt_filled"],
|
|
73
|
-
"filter-alt-off": ["filter_alt_off_outlined", "filter_alt_off_filled"],
|
|
74
|
-
fire: ["fire_outlined", "fire_filled"],
|
|
75
|
-
"fit-screen": ["fit_screen_outlined", "fit_screen_filled"],
|
|
76
|
-
flag: ["flag_outlined", "flag_filled"],
|
|
77
|
-
flash: ["flash_outlined", "flash_filled"],
|
|
78
|
-
"flash-off": ["flash_off_outlined", "flash_off_filled"],
|
|
79
|
-
"folder-add": ["folder_add_outlined", "folder_add_filled"],
|
|
80
|
-
folder: ["folder_outlined", "folder_filled"],
|
|
81
|
-
"folder-move": ["folder_move_outlined", "folder_move_filled"],
|
|
82
|
-
"folder-open": ["folder_open_outlined", "folder_open_filled"],
|
|
83
|
-
"folder-shared": ["folder_shared_outlined", "folder_shared_filled"],
|
|
84
|
-
forum: ["forum_outlined", "forum_filled"],
|
|
85
|
-
"group-add": ["group_add_outlined", "group_add_filled"],
|
|
86
|
-
group: ["group_outlined", "group_filled"],
|
|
87
|
-
groups: ["groups_outlined", "groups_filled"],
|
|
88
|
-
headphones: ["headphones_outlined", "headphones_filled"],
|
|
89
|
-
heart: ["heart_outlined", "heart_filled"],
|
|
90
|
-
help: ["help_outlined", "help_filled"],
|
|
91
|
-
home: ["home_outlined", "home_filled"],
|
|
92
|
-
hourglass: ["hourglass_outlined", "hourglass_filled"],
|
|
93
|
-
"image-broken": ["image_broken_outlined", "image_broken_filled"],
|
|
94
|
-
image: ["image_outlined", "image_filled"],
|
|
95
|
-
"image-gallery": ["image_gallery_outlined", "image_gallery_filled"],
|
|
96
|
-
inbox: ["inbox_outlined", "inbox_filled"],
|
|
97
|
-
info: ["info_outlined", "info_filled"],
|
|
98
|
-
keep: ["keep_outlined", "keep_filled"],
|
|
99
|
-
"keep-off": ["keep_off_outlined", "keep_off_filled"],
|
|
100
|
-
label: ["label_outlined", "label_filled"],
|
|
101
|
-
laptop: ["laptop_outlined", "laptop_filled"],
|
|
102
|
-
"left-panel-open": ["left_panel_open_outlined", "left_panel_open_filled"],
|
|
103
|
-
"left-panel-close": ["left_panel_close_outlined", "left_panel_close_filled"],
|
|
104
|
-
"light-off": ["light_off_outlined", "light_off_filled"],
|
|
105
|
-
"lightbulb-alt": ["lightbulb_alt_outlined", "lightbulb_alt_filled"],
|
|
106
|
-
"lightbulb-circle": ["lightbulb_circle_outlined", "lightbulb_circle_filled"],
|
|
107
|
-
lightbulb: ["lightbulb_outlined", "lightbulb_filled"],
|
|
108
|
-
"list-alt": ["list_alt_outlined", "list_alt_filled"],
|
|
109
|
-
"location-me": ["location_me_outlined", "location_me_filled"],
|
|
110
|
-
"location-off": ["location_off_outlined", "location_off_filled"],
|
|
111
|
-
"location-on": ["location_on_outlined", "location_on_filled"],
|
|
112
|
-
lock: ["lock_outlined", "lock_filled"],
|
|
113
|
-
"lock-open": ["lock_open_outlined", "lock_open_filled"],
|
|
114
|
-
"lock-open-right": ["lock_open_right_outlined", "lock_open_right_filled"],
|
|
115
|
-
mail: ["mail_outlined", "mail_filled"],
|
|
116
|
-
"mail-unread": ["mail_unread_outlined", "mail_unread_filled"],
|
|
117
|
-
map: ["map_outlined", "map_filled"],
|
|
118
|
-
mic: ["mic_outlined", "mic_filled"],
|
|
119
|
-
"mic-off": ["mic_off_outlined", "mic_off_filled"],
|
|
120
|
-
"mode-dark": ["mode_dark_outlined", "mode_dark_filled"],
|
|
121
|
-
"mode-light": ["mode_light_outlined", "mode_light_filled"],
|
|
122
|
-
notification: ["notification_outlined", "notification_filled"],
|
|
123
|
-
"notification-important": ["notification_important_outlined", "notification_important_filled"],
|
|
124
|
-
"notification-off": ["notification_off_outlined", "notification_off_filled"],
|
|
125
|
-
"notification-unread": ["notification_unread_outlined", "notification_unread_filled"],
|
|
126
|
-
palette: ["palette_outlined", "palette_filled"],
|
|
127
|
-
"pause-circle": ["pause_circle_outlined", "pause_circle_filled"],
|
|
128
|
-
pause: ["pause_outlined", "pause_filled"],
|
|
129
|
-
"photo-camera": ["photo_camera_outlined", "photo_camera_filled"],
|
|
130
|
-
"play-circle": ["play_circle_outlined", "play_circle_filled"],
|
|
131
|
-
play: ["play_outlined", "play_filled"],
|
|
132
|
-
power: ["power_outlined", "power_filled"],
|
|
133
|
-
"power-off": ["power_off_outlined", "power_off_filled"],
|
|
134
|
-
"power-plug-connect": ["power_plug_connect_outlined", "power_plug_connect_filled"],
|
|
135
|
-
"power-settings-circle": ["power_settings_circle_outlined", "power_settings_circle_filled"],
|
|
136
|
-
"power-solar": ["power_solar_outlined", "power_solar_filled"],
|
|
137
|
-
"power-switch": ["power_switch_outlined", "power_switch_filled"],
|
|
138
|
-
"power-wind": ["power_wind_outlined", "power_wind_filled"],
|
|
139
|
-
print: ["print_outlined", "print_filled"],
|
|
140
|
-
"right-panel-close": ["right_panel_close_outlined", "right_panel_close_filled"],
|
|
141
|
-
"right-panel-open": ["right_panel_open_outlined", "right_panel_open_filled"],
|
|
142
|
-
save: ["save_outlined", "save_filled"],
|
|
143
|
-
send: ["send_outlined", "send_filled"],
|
|
144
|
-
settings: ["settings_outlined", "settings_filled"],
|
|
145
|
-
share: ["share_outlined", "share_filled"],
|
|
146
|
-
"skip-next": ["skip_next_outlined", "skip_next_filled"],
|
|
147
|
-
"skip-previous": ["skip_previous_outlined", "skip_previous_filled"],
|
|
148
|
-
smartphone: ["smartphone_outlined", "smartphone_filled"],
|
|
149
|
-
star: ["star_outlined", "star_filled"],
|
|
150
|
-
"sticky-note": ["sticky_note_outlined", "sticky_note_filled"],
|
|
151
|
-
"stop-circle": ["stop_circle_outlined", "stop_circle_filled"],
|
|
152
|
-
stop: ["stop_outlined", "stop_filled"],
|
|
153
|
-
subtitles: ["subtitles_outlined", "subtitles_filled"],
|
|
154
|
-
"text-snippet": ["text_snippet_outlined", "text_snippet_filled"],
|
|
155
|
-
"trash-restore": ["trash_restore_outlined", "trash_restore_filled"],
|
|
156
|
-
unarchive: ["unarchive_outlined", "unarchive_filled"],
|
|
157
|
-
"user-add": ["user_add_outlined", "user_add_filled"],
|
|
158
|
-
"user-circle": ["user_circle_outlined", "user_circle_filled"],
|
|
159
|
-
user: ["user_outlined", "user_filled"],
|
|
160
|
-
"user-settings": ["user_settings_outlined", "user_settings_filled"],
|
|
161
|
-
verified: ["verified_outlined", "verified_filled"],
|
|
162
|
-
"video-camera": ["video_camera_outlined", "video_camera_filled"],
|
|
163
|
-
"video-camera-off": ["video_camera_off_outlined", "video_camera_off_filled"],
|
|
164
|
-
"video-gallery": ["video_gallery_outlined", "video_gallery_filled"],
|
|
165
|
-
"view-agenda": ["view_agenda_outlined", "view_agenda_filled"],
|
|
166
|
-
"view-column": ["view_column_outlined", "view_column_filled"],
|
|
167
|
-
"view-grid": ["view_grid_outlined", "view_grid_filled"],
|
|
168
|
-
"view-kanban": ["view_kanban_outlined", "view_kanban_filled"],
|
|
169
|
-
"view-module": ["view_module_outlined", "view_module_filled"],
|
|
170
|
-
"view-timeline": ["view_timeline_outlined", "view_timeline_filled"],
|
|
171
|
-
"visibility-hide": ["visibility_hide_outlined", "visibility_hide_filled"],
|
|
172
|
-
"visibility-show": ["visibility_show_outlined", "visibility_show_filled"],
|
|
173
|
-
"volume-down": ["volume_down_outlined", "volume_down_filled"],
|
|
174
|
-
"volume-mute": ["volume_mute_outlined", "volume_mute_filled"],
|
|
175
|
-
"volume-off": ["volume_off_outlined", "volume_off_filled"],
|
|
176
|
-
"volume-up": ["volume_up_outlined", "volume_up_filled"],
|
|
177
|
-
warning: ["warning_outlined", "warning_filled"],
|
|
178
|
-
waterdrop: ["waterdrop_outlined", "waterdrop_filled"],
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export const regularIcons = {
|
|
182
|
-
add: "add",
|
|
183
|
-
"alt-route": "alt_route",
|
|
184
|
-
apps: "apps",
|
|
185
|
-
"arrow-alt-down": "arrow_alt_down",
|
|
186
|
-
"arrow-alt-down-left": "arrow_alt_down_left",
|
|
187
|
-
"arrow-alt-down-right": "arrow_alt_down_right",
|
|
188
|
-
"arrow-alt-left": "arrow_alt_left",
|
|
189
|
-
"arrow-alt-right": "arrow_alt_right",
|
|
190
|
-
"arrow-alt-up": "arrow_alt_up",
|
|
191
|
-
"arrow-alt-up-left": "arrow_alt_up_left",
|
|
192
|
-
"arrow-alt-up-right": "arrow_alt_up_right",
|
|
193
|
-
"arrow-angle-down-left": "arrow_angle_down_left",
|
|
194
|
-
"arrow-angle-down-right": "arrow_angle_down_right",
|
|
195
|
-
"arrow-angle-up-left": "arrow_angle_up_left",
|
|
196
|
-
"arrow-angle-up-right": "arrow_angle_up_right",
|
|
197
|
-
"arrow-chevron-down": "arrow_chevron_down",
|
|
198
|
-
"arrow-chevron-left": "arrow_chevron_left",
|
|
199
|
-
"arrow-chevron-right": "arrow_chevron_right",
|
|
200
|
-
"arrow-chevron-up": "arrow_chevron_up",
|
|
201
|
-
"arrow-double-down": "arrow_double_down",
|
|
202
|
-
"arrow-double-left": "arrow_double_left",
|
|
203
|
-
"arrow-double-right": "arrow_double_right",
|
|
204
|
-
"arrow-double-up": "arrow_double_up",
|
|
205
|
-
"arrow-down": "arrow_down",
|
|
206
|
-
"arrow-down-left": "arrow_down_left",
|
|
207
|
-
"arrow-down-right": "arrow_down_right",
|
|
208
|
-
"arrow-drop-down": "arrow_drop_down",
|
|
209
|
-
"arrow-drop-up": "arrow_drop_up",
|
|
210
|
-
"arrow-left": "arrow_left",
|
|
211
|
-
"arrow-right": "arrow_right",
|
|
212
|
-
"arrow-up": "arrow_up",
|
|
213
|
-
"arrow-up-left": "arrow_up_left",
|
|
214
|
-
"arrow-up-right": "arrow_up_right",
|
|
215
|
-
asterisk: "asterisk",
|
|
216
|
-
"attach-file": "attach_file",
|
|
217
|
-
"battery-alt-empty": "battery_alt_empty",
|
|
218
|
-
"battery-alt-full": "battery_alt_full",
|
|
219
|
-
"battery-charging": "battery_charging",
|
|
220
|
-
"battery-empty": "battery_empty",
|
|
221
|
-
"battery-full": "battery_full",
|
|
222
|
-
bluetooth: "bluetooth",
|
|
223
|
-
"bluetooth-off": "bluetooth_off",
|
|
224
|
-
"chart-bar": "chart_bar",
|
|
225
|
-
"chart-bar-stacked": "chart_bar_stacked",
|
|
226
|
-
check: "check",
|
|
227
|
-
"check-indeterminate": "check_indeterminate",
|
|
228
|
-
"check-small": "check_small",
|
|
229
|
-
"checkbox-empty": "checkbox_empty",
|
|
230
|
-
close: "close",
|
|
231
|
-
compare: "compare",
|
|
232
|
-
"copy-all": "copy_all",
|
|
233
|
-
"crisis-alert": "crisis_alert",
|
|
234
|
-
cut: "cut",
|
|
235
|
-
download: "download",
|
|
236
|
-
"download-done": "download_done",
|
|
237
|
-
"drag-handle": "drag_handle",
|
|
238
|
-
"drag-indicator": "drag_indicator",
|
|
239
|
-
exclamation: "exclamation",
|
|
240
|
-
"explore-travel": "explore_travel",
|
|
241
|
-
"external-link": "external_link",
|
|
242
|
-
filter: "filter",
|
|
243
|
-
"filter-off": "filter_off",
|
|
244
|
-
"first-page": "first_page",
|
|
245
|
-
forward: "forward",
|
|
246
|
-
fullscreen: "fullscreen",
|
|
247
|
-
"fullscreen-exit": "fullscreen_exit",
|
|
248
|
-
history: "history",
|
|
249
|
-
"hourglass-empty": "hourglass_empty",
|
|
250
|
-
"info-i": "info_i",
|
|
251
|
-
language: "language",
|
|
252
|
-
"last-page": "last_page",
|
|
253
|
-
link: "link",
|
|
254
|
-
"link-off": "link_off",
|
|
255
|
-
list: "list",
|
|
256
|
-
"location-disabled": "location_disabled",
|
|
257
|
-
login: "login",
|
|
258
|
-
logout: "logout",
|
|
259
|
-
menu: "menu",
|
|
260
|
-
"menu-open": "menu_open",
|
|
261
|
-
monitoring: "monitoring",
|
|
262
|
-
"more-down": "more_down",
|
|
263
|
-
"more-horiz": "more_horiz",
|
|
264
|
-
"more-up": "more_up",
|
|
265
|
-
"more-vert": "more_vert",
|
|
266
|
-
ohm: "ohm",
|
|
267
|
-
"open-in-full": "open_in_full",
|
|
268
|
-
paste: "paste",
|
|
269
|
-
"play-pause": "play_pause",
|
|
270
|
-
"power-input": "power_input",
|
|
271
|
-
"power-plug": "power_plug",
|
|
272
|
-
"power-settings": "power_settings",
|
|
273
|
-
"priority-high": "priority_high",
|
|
274
|
-
public: "public",
|
|
275
|
-
publish: "publish",
|
|
276
|
-
"question-mark": "question_mark",
|
|
277
|
-
radar: "radar",
|
|
278
|
-
"radio-button-empty": "radio_button_empty",
|
|
279
|
-
redo: "redo",
|
|
280
|
-
reload: "reload",
|
|
281
|
-
remove: "remove",
|
|
282
|
-
reply: "reply",
|
|
283
|
-
"reply-all": "reply_all",
|
|
284
|
-
route: "route",
|
|
285
|
-
search: "search",
|
|
286
|
-
"side-navigation": "side_navigation",
|
|
287
|
-
sort: "sort",
|
|
288
|
-
"support-agent": "support_agent",
|
|
289
|
-
timeline: "timeline",
|
|
290
|
-
"trending-down": "trending_down",
|
|
291
|
-
"trending-flat": "trending_flat",
|
|
292
|
-
"trending-up": "trending_up",
|
|
293
|
-
tune: "tune",
|
|
294
|
-
undo: "undo",
|
|
295
|
-
upload: "upload",
|
|
296
|
-
water: "water",
|
|
297
|
-
"water-alt": "water_alt",
|
|
298
|
-
wifi: "wifi",
|
|
299
|
-
"wifi-off": "wifi_off",
|
|
300
|
-
windmill: "windmill",
|
|
301
|
-
"zoom-out": "zoom_out",
|
|
302
|
-
"zoom-in": "zoom_in",
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
export const isValidIconName = (name: string): boolean => isValidIconNameShared(name, regularIcons, togglableIcons);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="rte-icon-container" [innerHTML]="svgContent" [style.height]="(size())+'px'" [style.width]="(size())+'px'"></div>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from "@angular/common";
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
|
-
Component,
|
|
6
|
-
DestroyRef,
|
|
7
|
-
effect,
|
|
8
|
-
inject,
|
|
9
|
-
input,
|
|
10
|
-
} from "@angular/core";
|
|
11
|
-
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
12
|
-
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
|
|
13
|
-
import { Observable } from "rxjs";
|
|
14
|
-
|
|
15
|
-
import { IconService, RegularIconIdKey, TogglableIconIdKey } from "./icon.service";
|
|
16
|
-
|
|
17
|
-
@Component({
|
|
18
|
-
selector: "rte-icon",
|
|
19
|
-
imports: [CommonModule],
|
|
20
|
-
standalone: true,
|
|
21
|
-
templateUrl: "./icon.component.html",
|
|
22
|
-
styleUrl: "./icon.component.scss",
|
|
23
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
|
-
providers: [IconService],
|
|
25
|
-
})
|
|
26
|
-
export class IconComponent {
|
|
27
|
-
readonly name = input.required<RegularIconIdKey | TogglableIconIdKey>();
|
|
28
|
-
readonly size = input(20);
|
|
29
|
-
readonly color = input("currentColor");
|
|
30
|
-
readonly classes = input("");
|
|
31
|
-
readonly appearance = input<"outlined" | "filled">();
|
|
32
|
-
destroyRef = inject(DestroyRef);
|
|
33
|
-
|
|
34
|
-
svgContent: SafeHtml | null = null;
|
|
35
|
-
svg!: Observable<string>;
|
|
36
|
-
|
|
37
|
-
private sanitizer = inject(DomSanitizer);
|
|
38
|
-
private iconService = inject(IconService);
|
|
39
|
-
private cdr = inject(ChangeDetectorRef);
|
|
40
|
-
|
|
41
|
-
constructor() {
|
|
42
|
-
effect(() => {
|
|
43
|
-
this.setSvgContent(this.name());
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
private setSvgContent(svgName: RegularIconIdKey | TogglableIconIdKey) {
|
|
48
|
-
const svgFile = this.iconService.getSvg(svgName, this.appearance() || "outlined");
|
|
49
|
-
|
|
50
|
-
svgFile.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((res) => {
|
|
51
|
-
const size = this.size();
|
|
52
|
-
const svgWithSize = res.replace(/<svg([^>]*)>/, `<svg$1 width="${size}" height="${size}">`);
|
|
53
|
-
|
|
54
|
-
this.svgContent = this.sanitizer.bypassSecurityTrustHtml(svgWithSize);
|
|
55
|
-
this.cdr.markForCheck();
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from "@angular/common/http";
|
|
2
|
-
import { inject, Injectable } from "@angular/core";
|
|
3
|
-
import { Observable } from "rxjs";
|
|
4
|
-
|
|
5
|
-
import { regularIcons, togglableIcons } from "./icon-map";
|
|
6
|
-
|
|
7
|
-
export type RegularIconIdKey = keyof typeof regularIcons;
|
|
8
|
-
export type TogglableIconIdKey = keyof typeof togglableIcons;
|
|
9
|
-
|
|
10
|
-
@Injectable()
|
|
11
|
-
export class IconService {
|
|
12
|
-
private http = inject(HttpClient);
|
|
13
|
-
|
|
14
|
-
getSvg(name: RegularIconIdKey | TogglableIconIdKey, appearance: "outlined" | "filled"): Observable<string> {
|
|
15
|
-
if (!this.http) {
|
|
16
|
-
throw new Error("HttpClient is not available");
|
|
17
|
-
}
|
|
18
|
-
const toggableIcon = togglableIcons[name as TogglableIconIdKey];
|
|
19
|
-
|
|
20
|
-
if (toggableIcon) {
|
|
21
|
-
const [outlinedIconName, filledIconName] = toggableIcon;
|
|
22
|
-
|
|
23
|
-
const iconName = appearance === "filled" ? filledIconName : outlinedIconName;
|
|
24
|
-
return this.http.get(`assets/icons/${iconName}.svg`, { responseType: "text" });
|
|
25
|
-
} else {
|
|
26
|
-
const iconName = regularIcons[name as RegularIconIdKey];
|
|
27
|
-
if (!iconName) {
|
|
28
|
-
throw new Error(`Icon ${name} not found`);
|
|
29
|
-
}
|
|
30
|
-
return this.http.get(`assets/icons/${iconName}.svg`, { responseType: "text" });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/angular";
|
|
2
|
-
|
|
3
|
-
import { regularIcons as RegularIconsList, togglableIcons as TogglableIconsList } from "./icon-map";
|
|
4
|
-
import { IconComponent } from "./icon.component";
|
|
5
|
-
|
|
6
|
-
const RegularIconIds = Object.keys(RegularIconsList);
|
|
7
|
-
const TogglableIconIds = Object.keys(TogglableIconsList);
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Icon",
|
|
11
|
-
component: IconComponent,
|
|
12
|
-
tags: ["autodocs"],
|
|
13
|
-
argTypes: {
|
|
14
|
-
name: {
|
|
15
|
-
control: "select",
|
|
16
|
-
options: [...RegularIconIds, ...TogglableIconIds].sort((a, b) => a.localeCompare(b)),
|
|
17
|
-
description: "Nom de l’icône à afficher",
|
|
18
|
-
defaultValue: "check",
|
|
19
|
-
},
|
|
20
|
-
appearance: {
|
|
21
|
-
control: "select",
|
|
22
|
-
options: ["outlined", "filled"],
|
|
23
|
-
description: "Apparence de l’icône (pour les icônes togglables)",
|
|
24
|
-
defaultValue: "outlined",
|
|
25
|
-
},
|
|
26
|
-
size: {
|
|
27
|
-
control: { type: "number", min: 20, step: 1 },
|
|
28
|
-
description: "Taille de l’icône en pixels",
|
|
29
|
-
defaultValue: 20,
|
|
30
|
-
},
|
|
31
|
-
color: {
|
|
32
|
-
control: "color",
|
|
33
|
-
description: "Couleur de l’icône",
|
|
34
|
-
defaultValue: "#000000",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
} satisfies Meta<IconComponent>;
|
|
38
|
-
|
|
39
|
-
export default meta;
|
|
40
|
-
|
|
41
|
-
type Story = StoryObj<IconComponent>;
|
|
42
|
-
|
|
43
|
-
export const Default: Story = {
|
|
44
|
-
args: {
|
|
45
|
-
name: "add",
|
|
46
|
-
size: 20,
|
|
47
|
-
color: "#000000",
|
|
48
|
-
appearance: "outlined",
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const RegularIcons: Story = {
|
|
53
|
-
render: (args) => ({
|
|
54
|
-
props: { ...args, iconNames: RegularIconIds },
|
|
55
|
-
template: `
|
|
56
|
-
<div style="display: flex; flex-direction: column; flex-wrap: wrap; gap: 10px; height: 700px">
|
|
57
|
-
<div *ngFor="let iconName of iconNames" style="display: flex; align-items: center; gap: 5px; border: 1px solid #ccc; padding: 5px">
|
|
58
|
-
<rte-icon
|
|
59
|
-
[name]="iconName"
|
|
60
|
-
/>
|
|
61
|
-
<span>{{iconName}}</span>
|
|
62
|
-
</div>
|
|
63
|
-
</div>`,
|
|
64
|
-
}),
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const TogglableIcons: Story = {
|
|
68
|
-
render: (args) => ({
|
|
69
|
-
props: { ...args, iconNames: TogglableIconIds },
|
|
70
|
-
template: `
|
|
71
|
-
<div style="display: flex; flex-direction: column; flex-wrap: wrap; gap: 10px; height: 700px">
|
|
72
|
-
<div *ngFor="let iconName of iconNames" style="display: flex; align-items: center; gap: 5px; border: 1px solid #ccc; padding: 5px">
|
|
73
|
-
<rte-icon
|
|
74
|
-
[name]="iconName"
|
|
75
|
-
/>
|
|
76
|
-
<rte-icon
|
|
77
|
-
[name]="iconName"
|
|
78
|
-
appearance="filled"
|
|
79
|
-
/>
|
|
80
|
-
<span>{{iconName}}</span>
|
|
81
|
-
</div>
|
|
82
|
-
</div>`,
|
|
83
|
-
}),
|
|
84
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<button
|
|
2
|
-
*ngIf="isValidIconName"
|
|
3
|
-
class="rte-icon-button {{ variant() }} size-{{ size() }}"
|
|
4
|
-
[class.compact-spacing]="compactSpacing()"
|
|
5
|
-
[disabled]="disabled()"
|
|
6
|
-
[attr.aria-label]="ariaLabel()"
|
|
7
|
-
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
8
|
-
[type]="type()"
|
|
9
|
-
(click)="onClick($event)"
|
|
10
|
-
>
|
|
11
|
-
<rte-icon
|
|
12
|
-
[name]="name()"
|
|
13
|
-
[appearance]="appearance()"
|
|
14
|
-
[size]="buttonIconSize()"
|
|
15
|
-
/>
|
|
16
|
-
</button>
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
@use '@design-system-rte/core/design-tokens/main.scss' as *;
|
|
2
|
-
|
|
3
|
-
.rte-icon-button {
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
height: 24px;
|
|
7
|
-
align-items: center;
|
|
8
|
-
gap: $positive-spacing_0;
|
|
9
|
-
flex-shrink: 0;
|
|
10
|
-
|
|
11
|
-
&:focus-visible {
|
|
12
|
-
outline: none;
|
|
13
|
-
position: relative;
|
|
14
|
-
|
|
15
|
-
&::after {
|
|
16
|
-
content: '';
|
|
17
|
-
position: absolute;
|
|
18
|
-
inset: -4px;
|
|
19
|
-
border-radius: 6px;
|
|
20
|
-
pointer-events: none;
|
|
21
|
-
box-shadow: 0 0 0 1px var(--border-brand-focused);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.size-s {
|
|
26
|
-
border-radius: $radius-s;
|
|
27
|
-
height: 24px;
|
|
28
|
-
padding: $positive-spacing_025 $positive-spacing_050;
|
|
29
|
-
|
|
30
|
-
&.compact-spacing {
|
|
31
|
-
height: 16px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.size-m {
|
|
36
|
-
border-radius: $radius-s;
|
|
37
|
-
height: 32px;
|
|
38
|
-
padding: $positive-spacing_050 $positive-spacing_075;
|
|
39
|
-
|
|
40
|
-
&.compact-spacing {
|
|
41
|
-
height: 20px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&.size-l {
|
|
46
|
-
border-radius: $radius-m;
|
|
47
|
-
height: 40px;
|
|
48
|
-
padding: $positive-spacing_075 $positive-spacing_100;
|
|
49
|
-
|
|
50
|
-
&.compact-spacing {
|
|
51
|
-
height: 24px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&.primary {
|
|
56
|
-
background: var(--background-brand-default);
|
|
57
|
-
border: var(--border-brand-default);
|
|
58
|
-
color: var(--content-primary-inverse);
|
|
59
|
-
|
|
60
|
-
&:hover {
|
|
61
|
-
background: var(--background-brand-hover);
|
|
62
|
-
border: var(--background-brand-hover);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&:active {
|
|
66
|
-
background: var(--background-brand-pressed);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:disabled {
|
|
70
|
-
background: var(--background-disabled);
|
|
71
|
-
border: solid $width-xs var(--border-disabled);
|
|
72
|
-
box-shadow: none;
|
|
73
|
-
color: var(--content-disabled);
|
|
74
|
-
cursor: default;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.secondary {
|
|
79
|
-
background: var(--background-default);
|
|
80
|
-
border: solid $width-xs var(--border-brand-default);
|
|
81
|
-
color: var(--content-brand-default);
|
|
82
|
-
|
|
83
|
-
&:hover {
|
|
84
|
-
background: var(--background-brand-inverse-hover);
|
|
85
|
-
border: solid $width-xs var(--border-brand-default);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:active {
|
|
89
|
-
background: var(--background-brand-inverse-pressed);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&:disabled {
|
|
93
|
-
background: var(--background-disabled);
|
|
94
|
-
border: solid $width-xs var(--border-disabled);
|
|
95
|
-
color: var(--content-disabled);
|
|
96
|
-
cursor: default;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&.text {
|
|
101
|
-
background: transparent;
|
|
102
|
-
border: none;
|
|
103
|
-
color: var(--content-brand-default);
|
|
104
|
-
|
|
105
|
-
&:hover {
|
|
106
|
-
background: var(--background-brand-inverse-hover);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:active {
|
|
110
|
-
background: var(--background-brand-inverse-pressed);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&:disabled {
|
|
114
|
-
background: var(--background-disabled);
|
|
115
|
-
color: var(--content-disabled);
|
|
116
|
-
cursor: default;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&.transparent {
|
|
121
|
-
background: transparent;
|
|
122
|
-
border: none;
|
|
123
|
-
color: var(--content-brand-default);
|
|
124
|
-
|
|
125
|
-
&:hover {
|
|
126
|
-
color: var(--content-brand-hover);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&:active {
|
|
130
|
-
color: var(--content-brand-press);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&:disabled {
|
|
134
|
-
box-shadow: none;
|
|
135
|
-
background-color: var(--background-disabled);
|
|
136
|
-
color: var(--content-disabled);
|
|
137
|
-
cursor: default;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.danger {
|
|
142
|
-
background: var(--background-danger-default);
|
|
143
|
-
border: none;
|
|
144
|
-
color: var(--content-primary-inverse);
|
|
145
|
-
|
|
146
|
-
&:hover {
|
|
147
|
-
background: var(--background-danger-hover);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&:active {
|
|
151
|
-
background: var(--background-danger-pressed);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&:disabled {
|
|
155
|
-
background: var(--background-disabled);
|
|
156
|
-
border: solid $width-xs var(--border-disabled);
|
|
157
|
-
color: var(--content-disabled);
|
|
158
|
-
cursor: default;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&.compact-spacing {
|
|
163
|
-
padding: $positive-spacing_0;
|
|
164
|
-
}
|
|
165
|
-
}
|