@neuralytics/alpine-ds 0.3.0 → 0.4.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/CHANGELOG.md +7 -0
- package/README.md +7 -21
- package/dist/components/button/Button.vue.d.ts +3 -2
- package/dist/components/icon/Icon.types.d.ts +1 -0
- package/dist/components/icon/Icon.vue.d.ts +4 -4
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/warnIfNotAllowed.d.ts +2 -0
- package/dist/constants/iconOptions.d.ts +10 -10
- package/dist/icons.d.ts +1 -1
- package/dist/index.mjs +1134 -68
- package/dist/tailwind-preset.d.ts +2 -0
- package/dist/tailwind-preset.mjs +86 -11
- package/package.json +2 -8
- package/dist/icons-DedUTX68.js +0 -6
- package/dist/tailwind-tokens.d.ts +0 -4
- package/dist/tailwind-tokens.mjs +0 -87
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @neuralytics/alpine-ds
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 498adb8: AlpineIcon and AlpineButton's `icon` prop now uses Iconify names (e.g. `mdi:home`) instead of Tailwind CSS classes, rendered via `@iconify/vue`. Icons are limited to the `mdi` and `line-md` collections.
|
|
8
|
+
- 498adb8: Merged `tailwind-tokens` into `tailwind-preset`: the `@neuralytics/alpine-ds/tailwind-tokens` entrypoint is removed. Import `content`/`theme` from `@neuralytics/alpine-ds/tailwind-preset` instead — it now exports them as named exports alongside the default preset. This was only kept separate to let consumers opt out of the icon plugin's memory usage, which no longer applies now that icons render via `@iconify/vue`.
|
|
9
|
+
|
|
3
10
|
## 0.3.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ export default defineConfig({
|
|
|
45
45
|
@config "./tailwind.config.ts";
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
5. Configure Tailwind (`tailwind.config.ts`) using the design system's preset, which already handles detection of the package's classes
|
|
48
|
+
5. Configure Tailwind (`tailwind.config.ts`) using the design system's preset, which already handles detection of the package's classes:
|
|
49
49
|
|
|
50
50
|
```ts
|
|
51
51
|
import type { Config } from "tailwindcss"
|
|
@@ -59,26 +59,6 @@ export default {
|
|
|
59
59
|
} as Config
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
> **Note:** `./tailwind-preset` always loads this package's full icon collections (`mdi`, `line-md`) into memory via `@egoist/tailwindcss-icons`, even if you only need `content`/`theme`. If that's too heavy for your setup (e.g. it causes memory issues during your build), import those from `@neuralytics/alpine-ds/tailwind-tokens` instead — this entrypoint has zero dependency on the icon plugin:
|
|
63
|
-
>
|
|
64
|
-
> ```ts
|
|
65
|
-
> import type { Config } from "tailwindcss"
|
|
66
|
-
> import { content, theme } from "@neuralytics/alpine-ds/tailwind-tokens"
|
|
67
|
-
>
|
|
68
|
-
> export default {
|
|
69
|
-
> content: [
|
|
70
|
-
> ...content,
|
|
71
|
-
> // ... your source files ...
|
|
72
|
-
> ],
|
|
73
|
-
> theme,
|
|
74
|
-
> // No `plugins` here: configure your own icon plugin instead (e.g. `iconsPlugin`
|
|
75
|
-
> // from `@egoist/tailwindcss-icons`), with only the icon collections you actually
|
|
76
|
-
> // need. `tailwind-tokens` also exports `iconClasses`: the icon classes this
|
|
77
|
-
> // package's own components render internally, which your icon plugin setup must
|
|
78
|
-
> // still be able to generate.
|
|
79
|
-
> } as Config
|
|
80
|
-
> ```
|
|
81
|
-
|
|
82
62
|
6. Set the accent color in your project's `main.ts`:
|
|
83
63
|
|
|
84
64
|
```js
|
|
@@ -120,3 +100,9 @@ These are the only colors available: any other Tailwind color utility (e.g. `bg-
|
|
|
120
100
|
|
|
121
101
|
Note that all colors use 10 shades: `50`, `100`, `200`, ..., `900`.
|
|
122
102
|
`accent` must be provided by the consumer via `setAccentColorTheme` (see step 6 of [Integration](#integration)); the other colors already have a default value.
|
|
103
|
+
|
|
104
|
+
## Icons
|
|
105
|
+
|
|
106
|
+
`AlpineIcon` and `AlpineButton`'s `icon` prop accept [Iconify](https://iconify.design/) names from two collections only: `mdi:*` ([Material Design Icons](https://icon-sets.iconify.design/mdi/)) and `line-md:*` ([Material Line Icons](https://icon-sets.iconify.design/line-md/)). Any other collection logs a console warning and won't render.
|
|
107
|
+
|
|
108
|
+
Icons are fetched on demand from the Iconify API and cached — no bundling or extra Tailwind configuration needed for icons.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { IconName } from '../icon';
|
|
1
2
|
import { ButtonDesign as ButtonDesignType, ButtonIconPosition as ButtonIconPositionType, ButtonType as ButtonTypeType } from './Button.types';
|
|
2
3
|
export interface ButtonProps {
|
|
3
4
|
label?: string | null;
|
|
4
|
-
icon?:
|
|
5
|
+
icon?: IconName | null;
|
|
5
6
|
design?: ButtonDesignType;
|
|
6
7
|
isLoading?: boolean;
|
|
7
8
|
isDisabled?: boolean;
|
|
@@ -10,7 +11,7 @@ export interface ButtonProps {
|
|
|
10
11
|
type?: ButtonTypeType;
|
|
11
12
|
}
|
|
12
13
|
declare const _default: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
13
|
-
icon:
|
|
14
|
+
icon: IconName | null;
|
|
14
15
|
isLoading: boolean;
|
|
15
16
|
type: ButtonTypeType;
|
|
16
17
|
design: ButtonDesignType;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IconSize as IconSizeType } from './Icon.types';
|
|
1
|
+
import { IconName, IconSize as IconSizeType } from './Icon.types';
|
|
2
2
|
export interface IconProps {
|
|
3
|
-
icon:
|
|
4
|
-
hoverIcon?:
|
|
3
|
+
icon: IconName;
|
|
4
|
+
hoverIcon?: IconName;
|
|
5
5
|
size?: IconSizeType;
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {
|
|
9
9
|
size: IconSizeType;
|
|
10
10
|
isLoading: boolean;
|
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type IconSize, iconSizes } from './Icon.types';
|
|
1
|
+
export { type IconName, type IconSize, iconSizes } from './Icon.types';
|
|
2
2
|
export { default as AlpineIcon, type IconProps as AlpineIconProps, } from './Icon.vue';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const iconMap: {
|
|
2
|
-
readonly home: "
|
|
3
|
-
readonly account: "
|
|
4
|
-
readonly bell: "
|
|
5
|
-
readonly cog: "
|
|
6
|
-
readonly email: "
|
|
7
|
-
readonly file: "
|
|
8
|
-
readonly folder: "
|
|
9
|
-
readonly gear: "
|
|
10
|
-
readonly heart: "
|
|
2
|
+
readonly home: "mdi:home";
|
|
3
|
+
readonly account: "mdi:account";
|
|
4
|
+
readonly bell: "mdi:bell";
|
|
5
|
+
readonly cog: "mdi:cog";
|
|
6
|
+
readonly email: "mdi:email";
|
|
7
|
+
readonly file: "mdi:file";
|
|
8
|
+
readonly folder: "mdi:folder";
|
|
9
|
+
readonly gear: "mdi:gear";
|
|
10
|
+
readonly heart: "mdi:heart";
|
|
11
11
|
};
|
|
12
12
|
export declare const iconOptions: {
|
|
13
13
|
label: string;
|
|
14
|
-
value: "
|
|
14
|
+
value: "mdi:home" | "mdi:account" | "mdi:bell" | "mdi:cog" | "mdi:email" | "mdi:file" | "mdi:folder" | "mdi:gear" | "mdi:heart";
|
|
15
15
|
}[];
|
package/dist/icons.d.ts
CHANGED