@kong/icons 0.0.2-pr.1.8609e50.0 → 0.0.2-pr.1.99046a5.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/README.md +130 -8
- package/dist/kong-icons.es.js +1502 -1413
- package/dist/kong-icons.es.js.map +1 -1
- package/dist/kong-icons.umd.js +1 -1
- package/dist/kong-icons.umd.js.map +1 -1
- package/dist/types/components/flags/FlagEuIcon.vue.d.ts +85 -0
- package/dist/types/components/flags/FlagUsIcon.vue.d.ts +85 -0
- package/dist/types/components/flags/index.d.ts +9 -0
- package/dist/types/components/index.d.ts +4 -90
- package/dist/types/components/{AwsIcon.vue.d.ts → multi-color/AwsIcon.vue.d.ts} +2 -2
- package/dist/types/components/{AzureIcon.vue.d.ts → multi-color/AzureIcon.vue.d.ts} +2 -2
- package/dist/types/components/{GoogleCloudIcon.vue.d.ts → multi-color/GoogleCloudIcon.vue.d.ts} +2 -2
- package/dist/types/components/{GoogleIcon.vue.d.ts → multi-color/GoogleIcon.vue.d.ts} +2 -2
- package/dist/types/components/{RuntimeCompositeIcon.vue.d.ts → multi-color/RuntimeCompositeIcon.vue.d.ts} +2 -2
- package/dist/types/components/{RuntimeDedicatedCloudIcon.vue.d.ts → multi-color/RuntimeDedicatedCloudIcon.vue.d.ts} +2 -2
- package/dist/types/components/{RuntimeHybridIcon.vue.d.ts → multi-color/RuntimeHybridIcon.vue.d.ts} +2 -2
- package/dist/types/components/{RuntimeKicIcon.vue.d.ts → multi-color/RuntimeKicIcon.vue.d.ts} +2 -2
- package/dist/types/components/multi-color/index.d.ts +15 -0
- package/dist/types/components/{AddCircleIcon.vue.d.ts → solid/AddCircleIcon.vue.d.ts} +2 -2
- package/dist/types/components/{AddIcon.vue.d.ts → solid/AddIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ArrowDownIcon.vue.d.ts → solid/ArrowDownIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ArrowLeftIcon.vue.d.ts → solid/ArrowLeftIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ArrowRightIcon.vue.d.ts → solid/ArrowRightIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ArrowUpIcon.vue.d.ts → solid/ArrowUpIcon.vue.d.ts} +2 -2
- package/dist/types/components/{BackIcon.vue.d.ts → solid/BackIcon.vue.d.ts} +2 -2
- package/dist/types/components/{BarChartIcon.vue.d.ts → solid/BarChartIcon.vue.d.ts} +2 -2
- package/dist/types/components/{BookIcon.vue.d.ts → solid/BookIcon.vue.d.ts} +2 -2
- package/dist/types/components/{BotIcon.vue.d.ts → solid/BotIcon.vue.d.ts} +2 -2
- package/dist/types/components/{BrainIcon.vue.d.ts → solid/BrainIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CalIcon.vue.d.ts → solid/CalIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CheckCircleIcon.vue.d.ts → solid/CheckCircleIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CheckIcon.vue.d.ts → solid/CheckIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CheckSmallIcon.vue.d.ts → solid/CheckSmallIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ChevronDownIcon.vue.d.ts → solid/ChevronDownIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ChevronLeftIcon.vue.d.ts → solid/ChevronLeftIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ChevronRightIcon.vue.d.ts → solid/ChevronRightIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ChevronUpIcon.vue.d.ts → solid/ChevronUpIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ClearIcon.vue.d.ts → solid/ClearIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ClipboardIcon.vue.d.ts → solid/ClipboardIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ClockIcon.vue.d.ts → solid/ClockIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CloseIcon.vue.d.ts → solid/CloseIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CloudIcon.vue.d.ts → solid/CloudIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CogIcon.vue.d.ts → solid/CogIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CollapseIcon.vue.d.ts → solid/CollapseIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CollapsePanelIcon.vue.d.ts → solid/CollapsePanelIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ConnectionsIcon.vue.d.ts → solid/ConnectionsIcon.vue.d.ts} +2 -2
- package/dist/types/components/{CopyIcon.vue.d.ts → solid/CopyIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DangerCircleIcon.vue.d.ts → solid/DangerCircleIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DashboardIcon.vue.d.ts → solid/DashboardIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DeployIcon.vue.d.ts → solid/DeployIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DevPortalIcon.vue.d.ts → solid/DevPortalIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DisabledIcon.vue.d.ts → solid/DisabledIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DocumentIcon.vue.d.ts → solid/DocumentIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DocumentListIcon.vue.d.ts → solid/DocumentListIcon.vue.d.ts} +2 -2
- package/dist/types/components/{DragIcon.vue.d.ts → solid/DragIcon.vue.d.ts} +2 -2
- package/dist/types/components/{EditIcon.vue.d.ts → solid/EditIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ExpandIcon.vue.d.ts → solid/ExpandIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ExternalLinkIcon.vue.d.ts → solid/ExternalLinkIcon.vue.d.ts} +2 -2
- package/dist/types/components/{FeatureRequestIcon.vue.d.ts → solid/FeatureRequestIcon.vue.d.ts} +2 -2
- package/dist/types/components/{FileEmptyIcon.vue.d.ts → solid/FileEmptyIcon.vue.d.ts} +2 -2
- package/dist/types/components/{FilterIcon.vue.d.ts → solid/FilterIcon.vue.d.ts} +2 -2
- package/dist/types/components/{FlagIcon.vue.d.ts → solid/FlagIcon.vue.d.ts} +2 -2
- package/dist/types/components/{GraduationIcon.vue.d.ts → solid/GraduationIcon.vue.d.ts} +2 -2
- package/dist/types/components/{GridIcon.vue.d.ts → solid/GridIcon.vue.d.ts} +2 -2
- package/dist/types/components/{HelpIcon.vue.d.ts → solid/HelpIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ImageIcon.vue.d.ts → solid/ImageIcon.vue.d.ts} +2 -2
- package/dist/types/components/{InboxIcon.vue.d.ts → solid/InboxIcon.vue.d.ts} +2 -2
- package/dist/types/components/{IndeterminateSmallIcon.vue.d.ts → solid/IndeterminateSmallIcon.vue.d.ts} +2 -2
- package/dist/types/components/{InfoIcon.vue.d.ts → solid/InfoIcon.vue.d.ts} +2 -2
- package/dist/types/components/{KongIcon.vue.d.ts → solid/KongIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ListIcon.vue.d.ts → solid/ListIcon.vue.d.ts} +2 -2
- package/dist/types/components/{LockIcon.vue.d.ts → solid/LockIcon.vue.d.ts} +2 -2
- package/dist/types/components/{MeshIcon.vue.d.ts → solid/MeshIcon.vue.d.ts} +2 -2
- package/dist/types/components/{MoreHorizontalIcon.vue.d.ts → solid/MoreHorizontalIcon.vue.d.ts} +2 -2
- package/dist/types/components/{MoreIcon.vue.d.ts → solid/MoreIcon.vue.d.ts} +2 -2
- package/dist/types/components/{NotificationIcon.vue.d.ts → solid/NotificationIcon.vue.d.ts} +2 -2
- package/dist/types/components/{OverviewIcon.vue.d.ts → solid/OverviewIcon.vue.d.ts} +2 -2
- package/dist/types/components/{PeopleIcon.vue.d.ts → solid/PeopleIcon.vue.d.ts} +2 -2
- package/dist/types/components/{PlugIcon.vue.d.ts → solid/PlugIcon.vue.d.ts} +2 -2
- package/dist/types/components/{PortalIcon.vue.d.ts → solid/PortalIcon.vue.d.ts} +2 -2
- package/dist/types/components/{PresentationIcon.vue.d.ts → solid/PresentationIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ProfileIcon.vue.d.ts → solid/ProfileIcon.vue.d.ts} +2 -2
- package/dist/types/components/{RedoIcon.vue.d.ts → solid/RedoIcon.vue.d.ts} +2 -2
- package/dist/types/components/{RuntimesIcon.vue.d.ts → solid/RuntimesIcon.vue.d.ts} +2 -2
- package/dist/types/components/{SearchIcon.vue.d.ts → solid/SearchIcon.vue.d.ts} +2 -2
- package/dist/types/components/{SecurityIcon.vue.d.ts → solid/SecurityIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ServiceDocumentIcon.vue.d.ts → solid/ServiceDocumentIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ServiceHubIcon.vue.d.ts → solid/ServiceHubIcon.vue.d.ts} +2 -2
- package/dist/types/components/{ServicesIcon.vue.d.ts → solid/ServicesIcon.vue.d.ts} +2 -2
- package/dist/types/components/{SharedIcon.vue.d.ts → solid/SharedIcon.vue.d.ts} +2 -2
- package/dist/types/components/{SupportIcon.vue.d.ts → solid/SupportIcon.vue.d.ts} +2 -2
- package/dist/types/components/{TableIcon.vue.d.ts → solid/TableIcon.vue.d.ts} +2 -2
- package/dist/types/components/{TeammateIcon.vue.d.ts → solid/TeammateIcon.vue.d.ts} +2 -2
- package/dist/types/components/{TrashIcon.vue.d.ts → solid/TrashIcon.vue.d.ts} +2 -2
- package/dist/types/components/{VitalsIcon.vue.d.ts → solid/VitalsIcon.vue.d.ts} +2 -2
- package/dist/types/components/{WarningIcon.vue.d.ts → solid/WarningIcon.vue.d.ts} +2 -2
- package/dist/types/components/{WorldIcon.vue.d.ts → solid/WorldIcon.vue.d.ts} +2 -2
- package/dist/types/components/solid/index.d.ts +86 -0
- package/package.json +8 -7
- package/dist/types/components/EuropeanUnionIcon.vue.d.ts +0 -85
- package/dist/types/components/UnitedStatesIcon.vue.d.ts +0 -85
package/README.md
CHANGED
@@ -1,15 +1,107 @@
|
|
1
1
|
# Kong Icons
|
2
2
|
|
3
|
-
Kong's open-source icon component library.
|
3
|
+
Kong's open-source, Vue icon component library, partially sourced from [Google's Material Symbols](https://fonts.google.com/icons).
|
4
4
|
|
5
|
+
Vue components are generated from SVG source files located in the `/svg/` directory.
|
6
|
+
|
7
|
+
- [Usage](#usage)
|
8
|
+
- [Installation](#installation)
|
9
|
+
- [Import](#import)
|
10
|
+
- [Component Props](#component-props)
|
5
11
|
- [Contributing \& Local Development](#contributing--local-development)
|
6
|
-
- [SVG
|
12
|
+
- [SVG file requirements](#svg-file-requirements)
|
7
13
|
- [Development Sandbox](#development-sandbox)
|
8
14
|
- [Lint and fix](#lint-and-fix)
|
15
|
+
- [Testing](#testing)
|
9
16
|
- [Build for production](#build-for-production)
|
10
17
|
- [Committing Changes](#committing-changes)
|
11
18
|
- [Package Publishing](#package-publishing)
|
12
19
|
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Install the `@kong/icons` package in your host project.
|
25
|
+
|
26
|
+
```sh
|
27
|
+
yarn add @kong/icons
|
28
|
+
```
|
29
|
+
|
30
|
+
### Import
|
31
|
+
|
32
|
+
Icons should be imported individually which allows for proper tree-shaking, so only import the icons you need.
|
33
|
+
|
34
|
+
Notice that since the few styles that are included are inlined, there is no stylesheet to import.
|
35
|
+
|
36
|
+
```html
|
37
|
+
<template>
|
38
|
+
<button>
|
39
|
+
Add a service
|
40
|
+
<AddIcon size="24" />
|
41
|
+
</button>
|
42
|
+
</template>
|
43
|
+
|
44
|
+
<script setup lang="ts">
|
45
|
+
import { AddIcon } from '@kong/icons'
|
46
|
+
</script>
|
47
|
+
```
|
48
|
+
|
49
|
+
### Component Props
|
50
|
+
|
51
|
+
#### `title`
|
52
|
+
|
53
|
+
- type: `String`
|
54
|
+
- required: `false`
|
55
|
+
- default: `''`
|
56
|
+
|
57
|
+
The accessibility text provided to screen readers.
|
58
|
+
|
59
|
+
#### `color`
|
60
|
+
|
61
|
+
> **Note**: The `color` prop only impacts solid, single-color icons generated from the `/svg/solid/` directory.
|
62
|
+
|
63
|
+
- type: `String`
|
64
|
+
- required: `false`
|
65
|
+
- default: `'currentColor'`
|
66
|
+
|
67
|
+
Set the icon color to any valid CSS color value or `currentColor`, which inherits the text color of the icon's parent element.
|
68
|
+
|
69
|
+
#### `display`
|
70
|
+
|
71
|
+
- type: `String`
|
72
|
+
- required: `false`
|
73
|
+
- default: `'block'`
|
74
|
+
|
75
|
+
Set the CSS `display` property for the icon wrapper element.
|
76
|
+
|
77
|
+
#### `decorative`
|
78
|
+
|
79
|
+
- type: `Boolean`
|
80
|
+
- required: `false`
|
81
|
+
- default: `false`
|
82
|
+
|
83
|
+
Whether the SVG is meaningful to the page, or just complimentary. Utilized to expose or hide the SVG from screen readers.
|
84
|
+
|
85
|
+
#### `size`
|
86
|
+
|
87
|
+
- type: `[Number, String]`
|
88
|
+
- required: `false`
|
89
|
+
- default: `24`
|
90
|
+
|
91
|
+
The size of the icon, in pixels.
|
92
|
+
|
93
|
+
As a convenience, you may pass the size as a `number`, e.g. `24` or as a string that can be converted to an integer, such as `'48'`.
|
94
|
+
|
95
|
+
When utilizing a `string`, do not pass any units along with the value.
|
96
|
+
|
97
|
+
#### `tag`
|
98
|
+
|
99
|
+
- type: `String`
|
100
|
+
- required: `false`
|
101
|
+
- default: `'span'`
|
102
|
+
|
103
|
+
The HTML tag to use in place of the default wrapper `<span>` tag.
|
104
|
+
|
13
105
|
## Contributing & Local Development
|
14
106
|
|
15
107
|
To get started, install the package dependencies
|
@@ -18,16 +110,27 @@ To get started, install the package dependencies
|
|
18
110
|
yarn install --frozen-lockfile
|
19
111
|
```
|
20
112
|
|
21
|
-
### SVG
|
113
|
+
### SVG file requirements
|
114
|
+
|
115
|
+
Source SVG files **must**:
|
22
116
|
|
23
|
-
|
24
|
-
-
|
117
|
+
- be stored in the `/svg/` directory
|
118
|
+
- All solid (single-color) icon SVG files **must** be placed in the `/svg/solid/` directory
|
119
|
+
- All flag icon SVG files **must** be named following the format `flag-{country code}.svg` and **must** be placed in the `/svg/flags/` directory
|
120
|
+
- All multi-color SVG files **must** be placed in the `/svg/multi-color/` directory
|
121
|
+
- have a **unique**, `kebab-case` filename, regardless of the `/svg/*` subdirectory they are located in
|
122
|
+
- have a default size of `24px` when they are exported
|
123
|
+
- be sourced from and approved of by Kong's Design team
|
25
124
|
|
26
125
|
### Development Sandbox
|
27
126
|
|
28
|
-
This repository includes a Vue sandbox (see the `/sandbox` directory) to allow you to experiment with icons.
|
127
|
+
This repository includes a Vue sandbox app (see the `/sandbox` directory) to allow you to experiment with icons.
|
29
128
|
|
30
|
-
|
129
|
+
Before running the local dev server, you will need to run the generate command.
|
130
|
+
|
131
|
+
> **Note**: You must regenerate the icons and restart the sandbox if you make changes to files outside of the `/sandbox/` directory.
|
132
|
+
|
133
|
+
To compile the icon components and start the sandbox:
|
31
134
|
|
32
135
|
```sh
|
33
136
|
# Generate the Icon Components
|
@@ -49,9 +152,28 @@ yarn lint
|
|
49
152
|
yarn lint:fix
|
50
153
|
```
|
51
154
|
|
155
|
+
### Testing
|
156
|
+
|
157
|
+
Unit and component tests are run with [Vitest](https://vitest.dev/).
|
158
|
+
|
159
|
+
The Vitest settings are pre-configured to regenerate the icon components before every run.
|
160
|
+
|
161
|
+
```sh
|
162
|
+
# Run tests
|
163
|
+
yarn test
|
164
|
+
|
165
|
+
# Run tests in the Vitest UI
|
166
|
+
yarn test:open
|
167
|
+
|
168
|
+
# Update test snapshots
|
169
|
+
yarn test -u
|
170
|
+
```
|
171
|
+
|
172
|
+
When SVG files are added or removed, this will cause the test(s) that compare snapshots to fail. If the snapshot change is expected, run `yarn test -u` to update the test snapshots accordingly, then commit those changes to your branch.
|
173
|
+
|
52
174
|
### Build for production
|
53
175
|
|
54
|
-
|
176
|
+
Process the `/svg/` directory, generate the icon components and associated files, and build for production.
|
55
177
|
|
56
178
|
```sh
|
57
179
|
yarn build
|