@squirkle-ui/icons 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,204 @@
1
+ import { vModel, SqVirtualScroll, SqTextField, SqShape, SqSelect, SqProgressCircular, SqIcon, useProxiedModel, config, resolveIcon, applyOptions } from "@squirkle-ui/ui";
2
+ import { addCollection, addIcons } from "@squirkle-ui/ui";
3
+ import { defineComponent, ref, computed, watch, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, createElementVNode, createBlock, createCommentVNode, toDisplayString, withCtx, Fragment, renderList, normalizeClass } from "vue";
4
+ import { debounce } from "@squirkle-ui/core";
5
+ const _sfc_main = defineComponent({
6
+ name: "SqIconPicker",
7
+ components: { SqIcon, SqProgressCircular, SqSelect, SqShape, SqTextField, SqVirtualScroll },
8
+ model: vModel,
9
+ props: {
10
+ modelValue: { type: String, default: void 0 },
11
+ /** Limit to icon sets, e.g. ['mdi', 'lucide', 'tabler']. */
12
+ prefixes: { type: Array, default: () => ["mdi", "lucide", "tabler", "ph", "solar"] },
13
+ columns: { type: Number, default: 8 },
14
+ height: { type: [Number, String], default: 280 },
15
+ limit: { type: Number, default: 400 },
16
+ placeholder: { type: String, default: "Search icons…" }
17
+ },
18
+ emits: ["update:modelValue"],
19
+ setup(props, { emit }) {
20
+ const model = useProxiedModel(props, emit);
21
+ const query = ref("home");
22
+ const prefix = ref("all");
23
+ const results = ref([]);
24
+ const loading = ref(false);
25
+ const error = ref("");
26
+ const prefixItems = computed(() => [{ title: "All sets", value: "all" }, ...props.prefixes.map((p) => ({ title: p, value: p }))]);
27
+ let seq = 0;
28
+ const search = debounce(async () => {
29
+ const q = (query.value ?? "").trim();
30
+ const api = config.icons.api;
31
+ if (!q || !api) return results.value = [];
32
+ const my = ++seq;
33
+ loading.value = true;
34
+ error.value = "";
35
+ try {
36
+ const sets = prefix.value === "all" ? props.prefixes.join(",") : prefix.value;
37
+ const res = await fetch(`${api}/search?query=${encodeURIComponent(q)}&limit=${props.limit}&prefixes=${encodeURIComponent(sets)}`);
38
+ const json = await res.json();
39
+ if (my === seq) results.value = json.icons ?? [];
40
+ } catch {
41
+ if (my === seq) error.value = "Icon search is unavailable (offline?)";
42
+ } finally {
43
+ if (my === seq) loading.value = false;
44
+ }
45
+ }, 250);
46
+ watch([query, prefix], () => search());
47
+ onMounted(() => search());
48
+ const rows = computed(() => {
49
+ const out = [];
50
+ for (let i = 0; i < results.value.length; i += props.columns) out.push(results.value.slice(i, i + props.columns));
51
+ return out;
52
+ });
53
+ return { model, query, prefix, prefixItems, results, rows, loading, error };
54
+ }
55
+ });
56
+ const _export_sfc = (sfc, props) => {
57
+ const target = sfc.__vccOpts || sfc;
58
+ for (const [key, val] of props) {
59
+ target[key] = val;
60
+ }
61
+ return target;
62
+ };
63
+ const _hoisted_1 = {
64
+ class: "sq-icon-picker sq-surface",
65
+ style: { "--sq-r": "var(--sq-radius-xl)", "--sq-bg": "var(--sq-surface-raised)", "--sq-bd": "var(--sq-border)", "--sq-bw": "1px" }
66
+ };
67
+ const _hoisted_2 = { class: "sq-icon-picker__bar" };
68
+ const _hoisted_3 = {
69
+ key: 0,
70
+ class: "sq-icon-picker__state"
71
+ };
72
+ const _hoisted_4 = {
73
+ key: 1,
74
+ class: "sq-icon-picker__state"
75
+ };
76
+ const _hoisted_5 = {
77
+ key: 2,
78
+ class: "sq-icon-picker__state"
79
+ };
80
+ const _hoisted_6 = { class: "sq-icon-picker__row" };
81
+ const _hoisted_7 = ["title", "aria-label", "aria-pressed", "onClick"];
82
+ const _hoisted_8 = {
83
+ key: 4,
84
+ class: "sq-icon-picker__selected"
85
+ };
86
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
87
+ const _component_SqShape = resolveComponent("SqShape");
88
+ const _component_SqTextField = resolveComponent("SqTextField");
89
+ const _component_SqSelect = resolveComponent("SqSelect");
90
+ const _component_SqProgressCircular = resolveComponent("SqProgressCircular");
91
+ const _component_SqIcon = resolveComponent("SqIcon");
92
+ const _component_SqVirtualScroll = resolveComponent("SqVirtualScroll");
93
+ return openBlock(), createElementBlock("div", _hoisted_1, [
94
+ createVNode(_component_SqShape),
95
+ createElementVNode("div", _hoisted_2, [
96
+ createVNode(_component_SqTextField, {
97
+ modelValue: _ctx.query,
98
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.query = $event),
99
+ placeholder: _ctx.placeholder,
100
+ "prepend-inner-icon": "search",
101
+ density: "compact",
102
+ "hide-details": "",
103
+ clearable: ""
104
+ }, null, 8, ["modelValue", "placeholder"]),
105
+ _ctx.prefixes.length > 1 ? (openBlock(), createBlock(_component_SqSelect, {
106
+ key: 0,
107
+ modelValue: _ctx.prefix,
108
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.prefix = $event),
109
+ items: _ctx.prefixItems,
110
+ density: "compact",
111
+ "hide-details": "",
112
+ class: "sq-icon-picker__prefix"
113
+ }, null, 8, ["modelValue", "items"])) : createCommentVNode("v-if", true)
114
+ ]),
115
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_3, [
116
+ createVNode(_component_SqProgressCircular, {
117
+ indeterminate: "",
118
+ size: 22,
119
+ width: 3
120
+ })
121
+ ])) : _ctx.error ? (openBlock(), createElementBlock(
122
+ "div",
123
+ _hoisted_4,
124
+ toDisplayString(_ctx.error),
125
+ 1
126
+ /* TEXT */
127
+ )) : !_ctx.results.length ? (openBlock(), createElementBlock(
128
+ "div",
129
+ _hoisted_5,
130
+ toDisplayString(_ctx.query ? "No icons found" : "Type to search 200,000+ Iconify icons"),
131
+ 1
132
+ /* TEXT */
133
+ )) : (openBlock(), createBlock(_component_SqVirtualScroll, {
134
+ key: 3,
135
+ items: _ctx.rows,
136
+ "item-height": 56,
137
+ height: _ctx.height
138
+ }, {
139
+ default: withCtx(({ item }) => [
140
+ createElementVNode("div", _hoisted_6, [
141
+ (openBlock(true), createElementBlock(
142
+ Fragment,
143
+ null,
144
+ renderList(item, (name) => {
145
+ return openBlock(), createElementBlock("button", {
146
+ key: name,
147
+ type: "button",
148
+ class: normalizeClass(["sq-icon-picker__cell sq-squircle", { "sq-icon-picker__cell--active": name === _ctx.model }]),
149
+ title: name,
150
+ "aria-label": name,
151
+ "aria-pressed": name === _ctx.model ? "true" : "false",
152
+ onClick: ($event) => _ctx.model = name
153
+ }, [
154
+ createVNode(_component_SqIcon, {
155
+ icon: name,
156
+ size: "24px"
157
+ }, null, 8, ["icon"])
158
+ ], 10, _hoisted_7);
159
+ }),
160
+ 128
161
+ /* KEYED_FRAGMENT */
162
+ ))
163
+ ])
164
+ ]),
165
+ _: 1
166
+ /* STABLE */
167
+ }, 8, ["items", "height"])),
168
+ _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_8, [
169
+ createVNode(_component_SqIcon, {
170
+ icon: _ctx.model,
171
+ size: "20px"
172
+ }, null, 8, ["icon"]),
173
+ createElementVNode(
174
+ "code",
175
+ null,
176
+ toDisplayString(_ctx.model),
177
+ 1
178
+ /* TEXT */
179
+ )
180
+ ])) : createCommentVNode("v-if", true)
181
+ ]);
182
+ }
183
+ const SqIconPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
184
+ const componentNames = ["SqIconPicker"];
185
+ const aliasPresets = {
186
+ mdi: { home: "mdi:home-outline", user: "mdi:account-outline", settings: "mdi:cog-outline", bell: "mdi:bell-outline", heart: "mdi:heart-outline", cart: "mdi:cart-outline", chart: "mdi:chart-box-outline", mail: "mdi:email-outline", github: "mdi:github" },
187
+ lucide: { home: "lucide:home", user: "lucide:user", settings: "lucide:settings", bell: "lucide:bell", heart: "lucide:heart", cart: "lucide:shopping-cart", chart: "lucide:bar-chart-3", mail: "lucide:mail", github: "lucide:github" }
188
+ };
189
+ function useIconPreset(name) {
190
+ applyOptions({ icons: { aliases: { ...aliasPresets[name] } } });
191
+ }
192
+ function preloadIcons(names) {
193
+ names.forEach((n) => resolveIcon(n));
194
+ }
195
+ export {
196
+ SqIconPicker,
197
+ addCollection,
198
+ addIcons,
199
+ aliasPresets,
200
+ componentNames,
201
+ preloadIcons,
202
+ useIconPreset
203
+ };
204
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/SqIconPicker.vue","../../src/index.ts"],"sourcesContent":["<template>\n <div class=\"sq-icon-picker sq-surface\" :style=\"{ '--sq-r': 'var(--sq-radius-xl)', '--sq-bg': 'var(--sq-surface-raised)', '--sq-bd': 'var(--sq-border)', '--sq-bw': '1px' }\">\n <SqShape />\n <div class=\"sq-icon-picker__bar\">\n <SqTextField v-model=\"query\" :placeholder=\"placeholder\" prepend-inner-icon=\"search\" density=\"compact\" hide-details clearable />\n <SqSelect v-if=\"prefixes.length > 1\" v-model=\"prefix\" :items=\"prefixItems\" density=\"compact\" hide-details class=\"sq-icon-picker__prefix\" />\n </div>\n <div v-if=\"loading\" class=\"sq-icon-picker__state\"><SqProgressCircular indeterminate :size=\"22\" :width=\"3\" /></div>\n <div v-else-if=\"error\" class=\"sq-icon-picker__state\">{{ error }}</div>\n <div v-else-if=\"!results.length\" class=\"sq-icon-picker__state\">{{ query ? 'No icons found' : 'Type to search 200,000+ Iconify icons' }}</div>\n <SqVirtualScroll v-else :items=\"rows\" :item-height=\"56\" :height=\"height\">\n <template #default=\"{ item }\">\n <div class=\"sq-icon-picker__row\">\n <button\n v-for=\"name in item\"\n :key=\"name\"\n type=\"button\"\n class=\"sq-icon-picker__cell sq-squircle\"\n :class=\"{ 'sq-icon-picker__cell--active': name === model }\"\n :title=\"name\"\n :aria-label=\"name\"\n :aria-pressed=\"name === model ? 'true' : 'false'\"\n @click=\"model = name\"\n ><SqIcon :icon=\"name\" size=\"24px\" /></button>\n </div>\n </template>\n </SqVirtualScroll>\n <div v-if=\"model\" class=\"sq-icon-picker__selected\"><SqIcon :icon=\"model\" size=\"20px\" /><code>{{ model }}</code></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, onMounted, ref, watch, type PropType } from 'vue'\nimport { debounce } from '@squirkle-ui/core'\nimport { SqIcon, SqProgressCircular, SqSelect, SqShape, SqTextField, SqVirtualScroll, config, useProxiedModel, vModel } from '@squirkle-ui/ui'\n\n/** Searchable Iconify browser (uses the configured Iconify API host). v-model = icon name, e.g. `mdi:home`. */\nexport default defineComponent({\n name: 'SqIconPicker',\n components: { SqIcon, SqProgressCircular, SqSelect, SqShape, SqTextField, SqVirtualScroll },\n model: vModel,\n props: {\n modelValue: { type: String, default: undefined },\n /** Limit to icon sets, e.g. ['mdi', 'lucide', 'tabler']. */\n prefixes: { type: Array as PropType<string[]>, default: () => ['mdi', 'lucide', 'tabler', 'ph', 'solar'] },\n columns: { type: Number, default: 8 },\n height: { type: [Number, String], default: 280 },\n limit: { type: Number, default: 400 },\n placeholder: { type: String, default: 'Search icons…' },\n },\n emits: ['update:modelValue'],\n setup(props, { emit }) {\n const model = useProxiedModel<string | undefined>(props, emit)\n const query = ref('home')\n const prefix = ref('all')\n const results = ref<string[]>([])\n const loading = ref(false)\n const error = ref('')\n const prefixItems = computed(() => [{ title: 'All sets', value: 'all' }, ...props.prefixes.map((p) => ({ title: p, value: p }))])\n let seq = 0\n const search = debounce(async () => {\n const q = (query.value ?? '').trim()\n const api = config.icons.api\n if (!q || !api) return (results.value = [])\n const my = ++seq\n loading.value = true\n error.value = ''\n try {\n const sets = prefix.value === 'all' ? props.prefixes.join(',') : prefix.value\n const res = await fetch(`${api}/search?query=${encodeURIComponent(q)}&limit=${props.limit}&prefixes=${encodeURIComponent(sets)}`)\n const json = (await res.json()) as { icons?: string[] }\n if (my === seq) results.value = json.icons ?? []\n } catch {\n if (my === seq) error.value = 'Icon search is unavailable (offline?)'\n } finally {\n if (my === seq) loading.value = false\n }\n }, 250)\n watch([query, prefix], () => search())\n onMounted(() => search())\n const rows = computed(() => {\n const out: string[][] = []\n for (let i = 0; i < results.value.length; i += props.columns) out.push(results.value.slice(i, i + props.columns))\n return out\n })\n return { model, query, prefix, prefixItems, results, rows, loading, error }\n },\n})\n</script>\n\n<style>\n.sq-icon-picker { display: flex; flex-direction: column; gap: var(--sq-space-2); padding: var(--sq-space-3); width: 100%; max-width: 480px; }\n.sq-icon-picker__bar { display: flex; gap: var(--sq-space-2); }\n.sq-icon-picker__prefix { max-width: 140px; }\n.sq-icon-picker__state { display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--sq-muted); font-size: var(--sq-text-sm); }\n.sq-icon-picker__row { display: flex; gap: 4px; height: 56px; padding: 4px 0; }\n.sq-icon-picker__cell { --sq-r: var(--sq-radius-md); flex: 1; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--sq-on-surface); cursor: pointer; max-width: 56px; }\n.sq-icon-picker__cell:hover { background: color-mix(in srgb, var(--sq-primary) 10%, transparent); color: var(--sq-primary); }\n.sq-icon-picker__cell--active { background: var(--sq-primary) !important; color: var(--sq-on-primary) !important; }\n.sq-icon-picker__selected { display: flex; align-items: center; gap: var(--sq-space-2); padding-top: var(--sq-space-2); border-top: 1px solid var(--sq-border); font-size: var(--sq-text-sm); }\n</style>\n","import { addCollection, addIcons, applyOptions, resolveIcon } from '@squirkle-ui/ui'\nimport SqIconPicker from './SqIconPicker.vue'\n\nexport { SqIconPicker, addCollection, addIcons }\nexport const componentNames = ['SqIconPicker'] as const\n\n/** `$alias` presets mapping friendly names to popular Iconify sets. */\nexport const aliasPresets = {\n mdi: { home: 'mdi:home-outline', user: 'mdi:account-outline', settings: 'mdi:cog-outline', bell: 'mdi:bell-outline', heart: 'mdi:heart-outline', cart: 'mdi:cart-outline', chart: 'mdi:chart-box-outline', mail: 'mdi:email-outline', github: 'mdi:github' },\n lucide: { home: 'lucide:home', user: 'lucide:user', settings: 'lucide:settings', bell: 'lucide:bell', heart: 'lucide:heart', cart: 'lucide:shopping-cart', chart: 'lucide:bar-chart-3', mail: 'lucide:mail', github: 'lucide:github' },\n} as const\n\n/** Registers a preset so `<SqIcon icon=\"$home\">` resolves to that set. */\nexport function useIconPreset(name: keyof typeof aliasPresets) {\n applyOptions({ icons: { aliases: { ...aliasPresets[name] } } })\n}\n\n/** Warms the icon cache (batched Iconify API request) before icons render. */\nexport function preloadIcons(names: string[]) {\n names.forEach((n) => resolveIcon(n))\n}\n"],"names":["_openBlock","_createElementBlock","_createVNode","_createElementVNode","_createBlock","_createCommentVNode","_toDisplayString","_withCtx","_Fragment","_renderList","_normalizeClass"],"mappings":";;;;AAqCA,MAAA,YAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY,EAAE,QAAQ,oBAAoB,UAAU,SAAS,aAAa,gBAAA;AAAA,EAC1E,OAAO;AAAA,EACP,OAAO;AAAA,IACL,YAAY,EAAE,MAAM,QAAQ,SAAS,OAAA;AAAA;AAAA,IAErC,UAAU,EAAE,MAAM,OAA6B,SAAS,MAAM,CAAC,OAAO,UAAU,UAAU,MAAM,OAAO,EAAA;AAAA,IACvG,SAAS,EAAE,MAAM,QAAQ,SAAS,EAAA;AAAA,IAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ,MAAM,GAAG,SAAS,IAAA;AAAA,IAC3C,OAAO,EAAE,MAAM,QAAQ,SAAS,IAAA;AAAA,IAChC,aAAa,EAAE,MAAM,QAAQ,SAAS,gBAAA;AAAA,EAAgB;AAAA,EAExD,OAAO,CAAC,mBAAmB;AAAA,EAC3B,MAAM,OAAO,EAAE,QAAQ;AACrB,UAAM,QAAQ,gBAAoC,OAAO,IAAI;AAC7D,UAAM,QAAQ,IAAI,MAAM;AACxB,UAAM,SAAS,IAAI,KAAK;AACxB,UAAM,UAAU,IAAc,EAAE;AAChC,UAAM,UAAU,IAAI,KAAK;AACzB,UAAM,QAAQ,IAAI,EAAE;AACpB,UAAM,cAAc,SAAS,MAAM,CAAC,EAAE,OAAO,YAAY,OAAO,MAAA,GAAS,GAAG,MAAM,SAAS,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,CAA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,oBAAoB,OAAO,qBAAqB,MAAM,oBAAoB,OAAO,yBAAyB,MAAM,qBAAqB,QAAQ,aAAA;AAAA,EAC9O,QAAQ,EAAE,MAAM,eAAe,MAAM,eAAe,UAAU,mBAAmB,MAAM,eAAe,OAAO,gBAAgB,MAAM,wBAAwB,OAAO,sBAAsB,MAAM,eAAe,QAAQ,gBAAA;AACvN;AAGO,SAAS,cAAc,MAAiC;AAC7D,eAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,aAAa,IAAI,EAAA,EAAE,GAAK;AAChE;AAGO,SAAS,aAAa,OAAiB;AAC5C,QAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,CAAC;AACrC;"}
@@ -0,0 +1,19 @@
1
+
2
+ .sq-icon-picker { display: flex; flex-direction: column; gap: var(--sq-space-2); padding: var(--sq-space-3); width: 100%; max-width: 480px;
3
+ }
4
+ .sq-icon-picker__bar { display: flex; gap: var(--sq-space-2);
5
+ }
6
+ .sq-icon-picker__prefix { max-width: 140px;
7
+ }
8
+ .sq-icon-picker__state { display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--sq-muted); font-size: var(--sq-text-sm);
9
+ }
10
+ .sq-icon-picker__row { display: flex; gap: 4px; height: 56px; padding: 4px 0;
11
+ }
12
+ .sq-icon-picker__cell { --sq-r: var(--sq-radius-md); flex: 1; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--sq-on-surface); cursor: pointer; max-width: 56px;
13
+ }
14
+ .sq-icon-picker__cell:hover { background: color-mix(in srgb, var(--sq-primary) 10%, transparent); color: var(--sq-primary);
15
+ }
16
+ .sq-icon-picker__cell--active { background: var(--sq-primary) !important; color: var(--sq-on-primary) !important;
17
+ }
18
+ .sq-icon-picker__selected { display: flex; align-items: center; gap: var(--sq-space-2); padding-top: var(--sq-space-2); border-top: 1px solid var(--sq-border); font-size: var(--sq-text-sm);
19
+ }
package/package.json CHANGED
@@ -1,6 +1,63 @@
1
1
  {
2
2
  "name": "@squirkle-ui/icons",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "description": "Iconify integration and icon browser for Squirkle UI",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/KheangLov/squirkle-ui.git",
9
+ "directory": "packages/icons"
10
+ },
11
+ "homepage": "https://github.com/KheangLov/squirkle-ui#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/KheangLov/squirkle-ui/issues"
14
+ },
15
+ "keywords": [
16
+ "vue",
17
+ "icons",
18
+ "iconify",
19
+ "icon-picker"
20
+ ],
21
+ "type": "module",
22
+ "sideEffects": [
23
+ "*.css"
24
+ ],
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "main": "./dist/vue3/index.cjs",
29
+ "module": "./dist/vue3/index.mjs",
30
+ "types": "./dist/types/index.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/types/index.d.ts",
34
+ "import": "./dist/vue3/index.mjs",
35
+ "require": "./dist/vue3/index.cjs"
36
+ },
37
+ "./vue2": {
38
+ "types": "./dist/types/index.d.ts",
39
+ "import": "./dist/vue2/index.mjs",
40
+ "require": "./dist/vue2/index.cjs"
41
+ },
42
+ "./styles.css": "./dist/styles.css",
43
+ "./dist/types/*": {
44
+ "types": "./dist/types/*.d.ts"
45
+ }
46
+ },
47
+ "peerDependencies": {
48
+ "vue": "^2.7.0 || ^3.3.0",
49
+ "@squirkle-ui/ui": "^0.1.1"
50
+ },
51
+ "dependencies": {
52
+ "@squirkle-ui/core": "^0.1.1"
53
+ },
54
+ "devDependencies": {
55
+ "@squirkle-ui/ui": "^0.1.1"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "build": "node ../../scripts/build.mjs icons"
62
+ }
6
63
  }