@phila/phila-ui-filter-chip 0.2.0-beta.1 → 0.2.0-beta.3
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 +3 -3
- package/dist/FilterChip.vue.d.ts +8 -2
- package/dist/FilterChip.vue.d.ts.map +1 -1
- package/dist/FilterChipBase.vue.d.ts +3 -0
- package/dist/FilterChipBase.vue.d.ts.map +1 -1
- package/dist/FilterChipDropdownPanel.vue.d.ts +1 -1
- package/dist/FilterChipDropdownPanel.vue.d.ts.map +1 -1
- package/dist/FilterChipGroup.vue.d.ts +3 -1
- package/dist/FilterChipGroup.vue.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +163 -156
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ pnpm add @phila/phila-ui-filter-chip
|
|
|
22
22
|
## Shared model
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
-
import type { FilterDefinition, FilterValues } from "@phila/phila-ui-
|
|
25
|
+
import type { FilterDefinition, FilterValues } from "@phila/phila-ui-core";
|
|
26
26
|
|
|
27
27
|
// Describes one filter axis.
|
|
28
28
|
interface FilterDefinition {
|
|
@@ -61,7 +61,7 @@ const openNow = ref(false);
|
|
|
61
61
|
<script setup lang="ts">
|
|
62
62
|
import { ref } from "vue";
|
|
63
63
|
import { FilterChip } from "@phila/phila-ui-filter-chip";
|
|
64
|
-
import type { FilterChoice } from "@phila/phila-ui-
|
|
64
|
+
import type { FilterChoice } from "@phila/phila-ui-core";
|
|
65
65
|
|
|
66
66
|
const districtChoices: FilterChoice[] = [
|
|
67
67
|
{ text: "Center City", value: "center-city" },
|
|
@@ -97,7 +97,7 @@ With `filterButton`, a leading button (sliders icon + a count of total active se
|
|
|
97
97
|
<script setup lang="ts">
|
|
98
98
|
import { ref } from "vue";
|
|
99
99
|
import { FilterChipGroup } from "@phila/phila-ui-filter-chip";
|
|
100
|
-
import type { FilterDefinition, FilterValues } from "@phila/phila-ui-
|
|
100
|
+
import type { FilterDefinition, FilterValues } from "@phila/phila-ui-core";
|
|
101
101
|
|
|
102
102
|
const filters: FilterDefinition[] = [
|
|
103
103
|
{ key: "openNow", label: "Open Now" }, // toggle
|
package/dist/FilterChip.vue.d.ts
CHANGED
|
@@ -12,9 +12,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
12
12
|
size: import('@phila/phila-ui-core').ComponentSize;
|
|
13
13
|
color: import('./index').FilterChipColor;
|
|
14
14
|
iconDefinition: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
15
|
+
iconColor: string;
|
|
15
16
|
trailingIconDefinition: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
16
17
|
label: string;
|
|
17
|
-
choices: import('
|
|
18
|
+
choices: import('@phila/phila-ui-core').FilterChoice[];
|
|
18
19
|
multiple: boolean;
|
|
19
20
|
applyText: string;
|
|
20
21
|
resetText: string;
|
|
@@ -29,6 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
29
30
|
readonly size?: import('@phila/phila-ui-core').ComponentSize | undefined;
|
|
30
31
|
readonly color?: import('./index').FilterChipColor | undefined;
|
|
31
32
|
readonly iconDefinition?: import('@fortawesome/fontawesome-svg-core').IconDefinition | undefined;
|
|
33
|
+
readonly iconColor?: string | undefined;
|
|
32
34
|
readonly trailingIconDefinition?: import('@fortawesome/fontawesome-svg-core').IconDefinition | undefined;
|
|
33
35
|
readonly iconOnly?: boolean | undefined;
|
|
34
36
|
readonly active?: boolean | undefined;
|
|
@@ -58,6 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
58
60
|
size?: import('@phila/phila-ui-core').ComponentSize;
|
|
59
61
|
color?: import('./index').FilterChipColor;
|
|
60
62
|
iconDefinition?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
63
|
+
iconColor?: string;
|
|
61
64
|
trailingIconDefinition?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
62
65
|
iconOnly?: boolean;
|
|
63
66
|
active?: boolean;
|
|
@@ -75,6 +78,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
75
78
|
size: import('@phila/phila-ui-core').ComponentSize;
|
|
76
79
|
color: import('./index').FilterChipColor;
|
|
77
80
|
iconDefinition: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
81
|
+
iconColor: string;
|
|
78
82
|
trailingIconDefinition: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
79
83
|
iconOnly: boolean;
|
|
80
84
|
active: boolean;
|
|
@@ -104,6 +108,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
104
108
|
size: import('@phila/phila-ui-core').ComponentSize;
|
|
105
109
|
color: import('./index').FilterChipColor;
|
|
106
110
|
iconDefinition: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
111
|
+
iconColor: string;
|
|
107
112
|
trailingIconDefinition: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
108
113
|
iconOnly: boolean;
|
|
109
114
|
active: boolean;
|
|
@@ -113,6 +118,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
113
118
|
size?: import('@phila/phila-ui-core').ComponentSize;
|
|
114
119
|
color?: import('./index').FilterChipColor;
|
|
115
120
|
iconDefinition?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
121
|
+
iconColor?: string;
|
|
116
122
|
trailingIconDefinition?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
117
123
|
iconOnly?: boolean;
|
|
118
124
|
active?: boolean;
|
|
@@ -121,7 +127,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Fi
|
|
|
121
127
|
ariaExpanded?: boolean;
|
|
122
128
|
}> & Readonly<{
|
|
123
129
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
124
|
-
}>, "el" | ("text" | "size" | "color" | "iconDefinition" | "trailingIconDefinition" | "iconOnly" | "active" | "chevron")> & import('vue').ShallowUnwrapRef<{
|
|
130
|
+
}>, "el" | ("text" | "size" | "color" | "iconDefinition" | "iconColor" | "trailingIconDefinition" | "iconOnly" | "active" | "chevron")> & import('vue').ShallowUnwrapRef<{
|
|
125
131
|
el: import('vue').Ref<HTMLButtonElement | null, HTMLButtonElement | null>;
|
|
126
132
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
127
133
|
$slots: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChip.vue.d.ts","sourceRoot":"","sources":["../src/FilterChip.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterChip.vue.d.ts","sourceRoot":"","sources":["../src/FilterChip.vue"],"names":[],"mappings":"AAsLA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA4V02Q,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA5Ej/Q,GAAG;;AAxQjC,wBAgUK;AAaL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -6,6 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
size?: ComponentSize;
|
|
7
7
|
color?: FilterChipColor;
|
|
8
8
|
iconDefinition?: IconDefinition;
|
|
9
|
+
/** CSS color for the leading icon, independent of the chip's text color. */
|
|
10
|
+
iconColor?: string;
|
|
9
11
|
/** trailing icon (toggle mode); ignored when `chevron` is set. */
|
|
10
12
|
trailingIconDefinition?: IconDefinition;
|
|
11
13
|
/** render only the icon, centered, with no text content. */
|
|
@@ -40,6 +42,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
40
42
|
size: ComponentSize;
|
|
41
43
|
color: FilterChipColor;
|
|
42
44
|
iconDefinition: IconDefinition;
|
|
45
|
+
iconColor: string;
|
|
43
46
|
trailingIconDefinition: IconDefinition;
|
|
44
47
|
iconOnly: boolean;
|
|
45
48
|
active: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChipBase.vue.d.ts","sourceRoot":"","sources":["../src/FilterChipBase.vue"],"names":[],"mappings":"AA+
|
|
1
|
+
{"version":3,"file":"FilterChipBase.vue.d.ts","sourceRoot":"","sources":["../src/FilterChipBase.vue"],"names":[],"mappings":"AA+QA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,sBAAsB,CAAC,EAAE,cAAc,CAAC;IACxC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AA+DJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;UAlNV,MAAM;UACN,aAAa;WACZ,eAAe;oBACN,cAAc;eAEnB,MAAM;4BAEO,cAAc;cAE5B,OAAO;YAET,OAAO;aAEN,OAAO;;;qBAgNnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChipDropdownPanel.vue.d.ts","sourceRoot":"","sources":["../src/FilterChipDropdownPanel.vue"],"names":[],"mappings":"AAgOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FilterChipDropdownPanel.vue.d.ts","sourceRoot":"","sources":["../src/FilterChipDropdownPanel.vue"],"names":[],"mappings":"AAgOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,KAAK,WAAW,GAAG;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;;;;;;;;;;YAHS,OAAO;eACJ,MAAM;eACN,MAAM;;AA2QtB,wBASG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FilterChipGroupProps
|
|
1
|
+
import { FilterChipGroupProps } from './index';
|
|
2
|
+
import { FilterValues } from '@phila/phila-ui-core';
|
|
2
3
|
declare const _default: import('vue').DefineComponent<FilterChipGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
4
|
"update:modelValue": (value: FilterValues) => any;
|
|
4
5
|
"open-filters": () => any;
|
|
@@ -10,6 +11,7 @@ declare const _default: import('vue').DefineComponent<FilterChipGroupProps, {},
|
|
|
10
11
|
color: import('./index').FilterChipColor;
|
|
11
12
|
modelValue: FilterValues;
|
|
12
13
|
filterButton: boolean;
|
|
14
|
+
elevated: boolean;
|
|
13
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
14
16
|
el: HTMLDivElement;
|
|
15
17
|
}, HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChipGroup.vue.d.ts","sourceRoot":"","sources":["../src/FilterChipGroup.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterChipGroup.vue.d.ts","sourceRoot":"","sources":["../src/FilterChipGroup.vue"],"names":[],"mappings":"AAgQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,sBAAsB,CAAC;;;;;;;;;;;;;;;;AAqU3E,wBAUG"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.phila-filter-chip[data-v-
|
|
1
|
+
.phila-filter-chip[data-v-2925d75a]{display:inline-flex;align-items:center;height:var(--scale-350, 1.75rem);cursor:pointer;border-style:solid;border-radius:var(--border-radius-l);white-space:nowrap;box-sizing:border-box;appearance:none;text-decoration:none;padding:var(--scale-25) var(--scale-75);gap:var(--spacing-xs);border-width:var(--border-width-s)}.phila-filter-chip.is-extra-large[data-v-2925d75a]{height:var(--scale-400, 2rem);padding:var(--scale-75) var(--spacing-xs);gap:var(--spacing-2xs)}.phila-filter-chip.is-large[data-v-2925d75a]{height:var(--scale-400, 2rem);padding:var(--scale-75) var(--spacing-xs)}.phila-filter-chip.is-small[data-v-2925d75a]{height:var(--scale-250, 1.25rem);padding:var(--scale-10) var(--spacing-2xs);gap:var(--spacing-2xs)}.phila-filter-chip.is-icon-only[data-v-2925d75a]{padding-left:var(--spacing-s, .75rem);padding-right:var(--spacing-s, .75rem)}.phila-filter-chip.phila-filter-chip--blue[data-v-2925d75a]{color:var(--Schemes-Inverse-Primary);border-color:var(--Schemes-Inverse-Primary);background:var(--Schemes-Info-Container)}.phila-filter-chip.phila-filter-chip--blue.is-active[data-v-2925d75a]{background:var(--Palettes-Secondary-Secondary-150);color:var(--Schemes-On-Primary);border-color:var(--Palettes-Tertiary-Tertiary-100)}.phila-filter-chip.phila-filter-chip--blue[data-v-2925d75a]:hover:not(:disabled){background:var(--Palettes-Secondary-Secondary-600);color:var(--Palettes-Tertiary-Tertiary-50);border-color:var(--Palettes-Tertiary-Tertiary-100)}.phila-filter-chip.phila-filter-chip--grey[data-v-2925d75a]{color:var(--Palettes-Neutral-Variant-Neutral-Variant-200);border-color:var(--Schemes-Border-low);background:var(--Palettes-Neutral-Neutral-700)}.phila-filter-chip.phila-filter-chip--grey.is-active[data-v-2925d75a]{background:var(--Palettes-Neutral-Neutral-100);color:var(--Schemes-On-Primary);border-color:var(--Schemes-Border-low)}.phila-filter-chip.phila-filter-chip--grey[data-v-2925d75a]:hover:not(:disabled){background:var(--Palettes-Neutral-Neutral-600);color:var(--Palettes-Neutral-Variant-Neutral-Variant-50);border-color:var(--Schemes-Border-low)}.phila-filter-chip.phila-filter-chip--green[data-v-2925d75a]{color:var(--Palettes-Success-Success-100);border-color:var(--Palettes-Success-Success-150);background:var(--Palettes-Success-Success-700)}.phila-filter-chip.phila-filter-chip--green.is-active[data-v-2925d75a]{background:var(--Palettes-Success-Success-200);color:var(--Schemes-On-Primary);border-color:var(--Palettes-Success-Success-200)}.phila-filter-chip.phila-filter-chip--green[data-v-2925d75a]:hover:not(:disabled){background:var(--Palettes-Success-Success-600);color:var(--Palettes-Success-Success-100);border-color:var(--Palettes-Success-Success-150)}.phila-filter-chip.phila-filter-chip--red[data-v-2925d75a]{color:var(--Schemes-On-Error-Container);border-color:var(--Schemes-On-Error-Container);background:var(--Schemes-Error-Container)}.phila-filter-chip.phila-filter-chip--red.is-active[data-v-2925d75a]{background:var(--Palettes-Error-Error-250);color:var(--Schemes-On-Primary);border-color:var(--Palettes-Error-Error-150)}.phila-filter-chip.phila-filter-chip--red[data-v-2925d75a]:hover:not(:disabled){background:var(--Palettes-Error-Error-650);color:var(--Palettes-Error-Error-200);border-color:var(--Palettes-Error-Error-150)}.phila-filter-chip.phila-filter-chip--white[data-v-2925d75a]{color:var(--Palettes-Neutral-Variant-Neutral-Variant-200);border-color:var(--Schemes-Border-low);background:var(--Schemes-On-Primary)}.phila-filter-chip.phila-filter-chip--white.is-active[data-v-2925d75a]{background:var(--Palettes-Neutral-Neutral-100);color:var(--Schemes-On-Primary);border-color:var(--Schemes-Border-low)}.phila-filter-chip.phila-filter-chip--white[data-v-2925d75a]:hover:not(:disabled){background:var(--Schemes-Surface-Container-Lowest);color:var(--Schemes-Inverse-Surface);border-color:var(--Schemes-Border-low)}.phila-filter-chip.phila-filter-chip--yellow[data-v-2925d75a]{color:var(--Schemes-On-Alert-Container);border-color:var(--Palettes-Alert-Alert-150);background:var(--Palettes-Alert-Alert-700)}.phila-filter-chip.phila-filter-chip--yellow.is-active[data-v-2925d75a]{background:var(--Palettes-Alert-Alert-250);color:var(--Schemes-On-Primary);border-color:var(--Palettes-Alert-Alert-150)}.phila-filter-chip.phila-filter-chip--yellow[data-v-2925d75a]:hover:not(:disabled){background:var(--Palettes-Alert-Alert-550);color:var(--Schemes-On-Alert-Container);border-color:var(--Palettes-Alert-Alert-150)}.phila-filter-chip[data-v-2925d75a]:focus-visible{outline:2px solid currentColor;outline-offset:var(--spacing-2xs)}.phila-filter-chip[data-v-2925d75a] .icon{color:var(--chip-icon-color, currentColor)}.phila-filter-chip[data-v-2925d75a] .icon path{fill:var(--chip-icon-color, currentColor)}.phila-filter-chip-panel{position:fixed;z-index:1000;min-width:12rem;background:var(--Schemes-Background);border:var(--border-width-s) solid var(--Schemes-Border);border-radius:var(--border-radius-s);box-shadow:0 4px 8px #0000001a;padding:var(--spacing-s, .75rem);display:flex;flex-direction:column;gap:var(--spacing-s, .75rem)}.phila-filter-chip-panel__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--spacing-s, .75rem)}.phila-filter-chip-sheet__scrim{position:fixed;inset:0;z-index:1000;background:#0000004d}.phila-filter-chip-sheet{position:fixed;left:0;right:0;bottom:0;z-index:1001;background:var(--Schemes-Background);border-top-left-radius:var(--border-radius-l, 1rem);border-top-right-radius:var(--border-radius-l, 1rem);box-shadow:0 -4px 16px #00000026;padding:var(--spacing-m, 1rem);display:flex;flex-direction:column;gap:var(--spacing-s, .75rem);max-height:80vh;overflow-y:auto}.phila-filter-chip-sheet__header{display:flex;align-items:center;justify-content:space-between}.phila-filter-chip-sheet__title{font-weight:700;font-family:var(--Body-Default-font-body-default-family, "Montserrat", sans-serif)}.phila-filter-chip-sheet__footer{display:flex;gap:var(--spacing-s, .75rem);margin-top:var(--spacing-xs, .5rem)}.phila-filter-chip-sheet__footer>*{flex:1}.phila-filter-chip-sheet__close{background:none;border:none;cursor:pointer;font-size:1.25rem;line-height:1;padding:0;color:var(--Schemes-On-Surface, inherit)}.phila-filter-chip-sheet .labels-container{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.phila-filter-chip-panel .phila-filter-chip-panel__reset{background:none;border:none;padding:0;cursor:pointer;color:var(--Schemes-Primary);text-decoration:underline;font-weight:600}.phila-filter-chip-panel .phila-filter-chip-panel__reset:focus-visible{outline:2px solid var(--Schemes-Primary);outline-offset:2px}.phila-filter-chip-group[data-v-9c777e02]{display:flex;flex-direction:column;gap:var(--spacing-2xs)}.phila-filter-chip-group__viewport[data-v-9c777e02]{position:relative}.phila-filter-chip-group__label[data-v-9c777e02]{padding-inline:var(--spacing-m)}.phila-filter-chip-group__row[data-v-9c777e02]{display:flex;flex-wrap:nowrap;gap:var(--spacing-xs);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding-inline:var(--spacing-m)}.phila-filter-chip-group__row[data-v-9c777e02]::-webkit-scrollbar{display:none}.phila-filter-chip-group__arrow[data-v-9c777e02]{position:absolute;top:50%;transform:translateY(-50%);z-index:1;display:none;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border-radius:50%;border:var(--border-width-s) solid var(--Schemes-Border);background:var(--Schemes-Background);color:var(--Schemes-On-Surface);box-shadow:0 6px 8px -2px #00000059;cursor:pointer}.phila-filter-chip-group__arrow--left[data-v-9c777e02]{left:var(--spacing-m)}.phila-filter-chip-group__arrow--right[data-v-9c777e02]{right:var(--spacing-m)}@media(hover:hover)and (pointer:fine){.phila-filter-chip-group__viewport:hover .phila-filter-chip-group__arrow[data-v-9c777e02]{display:flex}}.phila-filter-chip-group.is-elevated[data-v-9c777e02] .phila-filter-chip{box-shadow:0 2px 4px #0003}.phila-filter-chip-group.is-elevated .phila-filter-chip-group__row[data-v-9c777e02]{padding-top:2px;padding-bottom:8px}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
import { BaseProps, ComponentSize } from '@phila/phila-ui-core';
|
|
1
|
+
import { BaseProps, ComponentSize, FilterChoice, FilterDefinition, FilterValues } from '@phila/phila-ui-core';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
export { default as FilterChip } from './FilterChip.vue';
|
|
4
4
|
export { default as FilterChipGroup } from './FilterChipGroup.vue';
|
|
5
5
|
export type FilterChipColor = "blue" | "grey" | "green" | "red" | "white" | "yellow";
|
|
6
|
-
/** value is string to satisfy RadioGroup (string-only) and CheckboxGroup. */
|
|
7
|
-
export interface FilterChoice {
|
|
8
|
-
text: string;
|
|
9
|
-
value: string;
|
|
10
|
-
}
|
|
11
|
-
export interface FilterDefinition {
|
|
12
|
-
key: string;
|
|
13
|
-
label: string;
|
|
14
|
-
/** Present → dropdown chip; absent → toggle chip. */
|
|
15
|
-
choices?: FilterChoice[];
|
|
16
|
-
/** Dropdown only: checkbox group (true) vs radio group (false). Default false. */
|
|
17
|
-
multiple?: boolean;
|
|
18
|
-
iconDefinition?: IconDefinition;
|
|
19
|
-
/** Leave this filter's selections out of the filter button's count (e.g. Sort). */
|
|
20
|
-
excludeFromCount?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export type FilterValues = Record<string, string | string[] | boolean>;
|
|
23
6
|
/** A single chip. Toggle mode when `choices` is absent; dropdown mode when present. */
|
|
24
7
|
export interface FilterChipProps extends BaseProps {
|
|
25
8
|
/** Chip label (also the radio/checkbox group label in dropdown mode). */
|
|
@@ -29,6 +12,8 @@ export interface FilterChipProps extends BaseProps {
|
|
|
29
12
|
size?: ComponentSize;
|
|
30
13
|
color?: FilterChipColor;
|
|
31
14
|
iconDefinition?: IconDefinition;
|
|
15
|
+
/** CSS color for the leading icon, independent of the text color. */
|
|
16
|
+
iconColor?: string;
|
|
32
17
|
/** Toggle mode: trailing icon (ignored in dropdown mode, which uses a chevron). */
|
|
33
18
|
trailingIconDefinition?: IconDefinition;
|
|
34
19
|
/** Toggle mode: selection state. */
|
|
@@ -50,5 +35,7 @@ export interface FilterChipGroupProps extends BaseProps {
|
|
|
50
35
|
color?: FilterChipColor;
|
|
51
36
|
/** Show a leading button (sliders icon + active-selection count) that emits `open-filters`. */
|
|
52
37
|
filterButton?: boolean;
|
|
38
|
+
/** When true, applies an elevation shadow to each chip (for floating over a map). */
|
|
39
|
+
elevated?: boolean;
|
|
53
40
|
}
|
|
54
41
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErF,uFAAuF;AACvF,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,sBAAsB,CAAC,EAAE,cAAc,CAAC;IACxC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,+FAA+F;IAC/F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),b=require("@phila/phila-ui-core"),w=require("@fortawesome/pro-solid-svg-icons"),L=require("@phila/phila-ui-radio"),R=require("@phila/phila-ui-checkbox"),D=require("@phila/phila-ui-button"),F=["aria-pressed","aria-expanded"],E="xxsmall",U=e.defineComponent({__name:"FilterChipBase",props:{text:{default:void 0},size:{default:"medium"},color:{default:"blue"},iconDefinition:{default:void 0},trailingIconDefinition:{default:void 0},iconOnly:{type:Boolean,default:!1},active:{type:Boolean,default:!1},chevron:{type:Boolean,default:!1},ariaPressed:{type:Boolean},ariaExpanded:{type:Boolean}},emits:["click"],setup(t,{expose:u}){const l=t,a=e.ref(null),o=e.computed(()=>b.cn("phila-filter-chip",`phila-filter-chip--${l.color}`,l.size!=="medium"&&`is-${l.size}`,"has-text-body-"+s(l.size),l.active&&"is-active",l.iconOnly&&"is-icon-only"));u({el:a});const s=r=>{switch(r){case"extra-large":return"default";case"large":return"small";default:return"extra-small"}};return(r,h)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"rootEl",ref:a,type:"button",class:e.normalizeClass(o.value),"aria-pressed":t.ariaPressed,"aria-expanded":t.ariaExpanded,onClick:h[0]||(h[0]=v=>r.$emit("click",v))},[e.createVNode(e.unref(b.ActionContent),{"icon-definition":t.iconDefinition,size:t.size,inline:"","icon-size":E,"icon-only":t.iconOnly},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)],!0)]),_:3},8,["icon-definition","size","icon-only"]),t.chevron?(e.openBlock(),e.createBlock(e.unref(b.Icon),{key:0,"icon-definition":e.unref(w.faChevronDown),size:"xxsmall",inline:"",decorative:"",class:"phila-filter-chip__chevron"},null,8,["icon-definition"])):t.trailingIconDefinition?(e.openBlock(),e.createBlock(e.unref(b.Icon),{key:1,"icon-definition":t.trailingIconDefinition,size:E,inline:"",decorative:""},null,8,["icon-definition"])):e.createCommentVNode("",!0)],10,F))}}),$=(t,u)=>{const l=t.__vccOpts||t;for(const[a,o]of u)l[a]=o;return l},S=$(U,[["__scopeId","data-v-7411a108"]]),M=["id","aria-label"],O={key:0,class:"phila-filter-chip-sheet__header"},q={class:"phila-filter-chip-sheet__title"},G={key:3,class:"phila-filter-chip-sheet__footer"},H={key:4,class:"phila-filter-chip-panel__footer"},W=e.defineComponent({__name:"FilterChipDropdownPanel",props:{menuId:{},label:{},choices:{},multiple:{type:Boolean},value:{},top:{},left:{},mobile:{type:Boolean,default:!1},applyText:{default:"Apply"},resetText:{default:"Reset"}},emits:["apply","reset","close"],setup(t,{emit:u}){const l=t,a=u,o=e.ref(typeof l.value=="string"?l.value:""),s=e.ref(Array.isArray(l.value)?[...l.value]:[]);e.watch(()=>l.value,c=>{l.multiple?s.value=Array.isArray(c)?[...c]:[]:o.value=typeof c=="string"?c:""});const r=e.computed(()=>l.choices.map(c=>({text:c.text,value:c.value}))),h=e.computed(()=>l.multiple?s.value.length:o.value?1:0),v=e.computed(()=>h.value>0?`${l.applyText} (${h.value})`:l.applyText),k=()=>{o.value="",s.value=[],a("reset")},d=()=>{a("apply",l.multiple?[...s.value]:o.value)};return(c,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.mobile?(e.openBlock(),e.createElementBlock("div",{key:0,class:"phila-filter-chip-sheet__scrim",onClick:m[0]||(m[0]=y=>a("close"))})):e.createCommentVNode("",!0),e.createElementVNode("div",{id:t.menuId,class:e.normalizeClass(t.mobile?"phila-filter-chip-sheet":"phila-filter-chip-panel"),role:"dialog","aria-label":t.label,style:e.normalizeStyle(t.mobile?void 0:{top:t.top+"px",left:t.left+"px"})},[t.mobile?(e.openBlock(),e.createElementBlock("header",O,[e.createElementVNode("span",q,e.toDisplayString(t.label),1),e.createElementVNode("button",{type:"button",class:"phila-filter-chip-sheet__close","aria-label":"Close",onClick:m[1]||(m[1]=y=>a("close"))}," ✕ ")])):e.createCommentVNode("",!0),t.multiple?(e.openBlock(),e.createBlock(e.unref(R.CheckboxGroup),{key:1,"group-label":t.label,choices:r.value,"model-value":s.value,"onUpdate:modelValue":m[2]||(m[2]=y=>s.value=y)},null,8,["group-label","choices","model-value"])):(e.openBlock(),e.createBlock(e.unref(L.RadioGroup),{key:2,"group-label":t.label,choices:r.value,"model-value":o.value,"onUpdate:modelValue":m[3]||(m[3]=y=>o.value=y)},null,8,["group-label","choices","model-value"])),t.mobile?(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(e.unref(D.PhilaButton),{variant:"secondary",text:t.resetText,onClick:k},null,8,["text"]),e.createVNode(e.unref(D.PhilaButton),{variant:"primary",text:v.value,onClick:d},null,8,["text"])])):(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("button",{type:"button",class:"phila-filter-chip-panel__reset has-text-body-small",onClick:k},e.toDisplayString(t.resetText),1),e.createVNode(e.unref(D.PhilaButton),{variant:"primary",size:"small",text:t.applyText,onClick:d},null,8,["text"])]))],14,M)]))}}),N="(max-width: 1064px) and (max-height: 915px)";function X(){const t=e.ref(typeof window<"u"&&window.matchMedia(N).matches);let u=null;function l(a){t.value=a.matches}return e.onMounted(()=>{u=window.matchMedia(N),t.value=u.matches,u.addEventListener("change",l)}),e.onBeforeUnmount(()=>{u?.removeEventListener("change",l)}),{isMobile:t}}let j=0;const A=e.defineComponent({__name:"FilterChip",props:{label:{default:void 0},text:{default:void 0},size:{default:"medium"},color:{default:"blue"},iconDefinition:{default:void 0},trailingIconDefinition:{default:void 0},selected:{type:Boolean,default:!1},choices:{default:void 0},multiple:{type:Boolean,default:!1},modelValue:{type:[String,Array,Boolean],default:void 0},applyText:{default:"Apply"},resetText:{default:"Reset"},className:{}},emits:["update:selected","update:modelValue","click"],setup(t,{emit:u}){const l=t,a=u,o=e.computed(()=>Array.isArray(l.choices)),s=e.useSlots(),r=e.computed(()=>!o.value&&!!l.iconDefinition&&!l.text&&!l.label&&!s.default);function h(p){a("update:selected",!l.selected),a("click",p)}const v=`phila-filter-chip-${e.useId()}-${++j}`,{isVisible:k,setVisibility:d}=b.useVisibility({id:v,group:"phila-filter-chip",outsideClickHide:!0,escapeKeyHide:!0,showSingle:!0}),c=e.computed(()=>k(v)),{isMobile:m}=X(),y=e.ref(null),C=e.ref(0),g=e.ref(0),z=e.computed(()=>l.multiple?Array.isArray(l.modelValue)?l.modelValue:[]:typeof l.modelValue=="string"?l.modelValue:""),x=e.computed(()=>l.multiple?Array.isArray(l.modelValue)&&l.modelValue.length>0:typeof l.modelValue=="string"&&l.modelValue!==""),i=e.computed(()=>l.multiple&&Array.isArray(l.modelValue)?l.modelValue.length:0),f=e.computed(()=>{const p=l.label??l.text??"";return i.value>0?`${p} (${i.value})`:p});function n(){const p=y.value?.el??null;if(!p)return;const V=p.getBoundingClientRect();C.value=V.bottom+4,g.value=V.left}function B(){c.value&&d(!1)}e.watch(c,p=>{p&&!m.value?window.addEventListener("scroll",B,{capture:!0}):window.removeEventListener("scroll",B,{capture:!0})});function T(){const p=!c.value;p&&!m.value&&n(),d(p)}function I(p){a("update:modelValue",p),d(!1)}function P(){a("update:modelValue",l.multiple?[]:"")}return(p,V)=>o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(S,{ref_key:"triggerRef",ref:y,text:f.value,size:t.size,color:t.color,"icon-definition":t.iconDefinition,active:x.value||c.value,chevron:"","aria-expanded":c.value,"data-toggle":`visibility-${v}`,onClick:T},null,8,["text","size","color","icon-definition","active","aria-expanded","data-toggle"]),c.value?(e.openBlock(),e.createBlock(W,{key:0,"menu-id":v,label:t.label??t.text??"",choices:t.choices,multiple:t.multiple,value:z.value,top:C.value,left:g.value,mobile:e.unref(m),"apply-text":t.applyText,"reset-text":t.resetText,onApply:I,onReset:P,onClose:V[0]||(V[0]=ee=>e.unref(d)(!1))},null,8,["label","choices","multiple","value","top","left","mobile","apply-text","reset-text"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(S,{key:1,size:t.size,color:t.color,"icon-definition":t.iconDefinition,"trailing-icon-definition":t.trailingIconDefinition,"icon-only":r.value,active:t.selected,"aria-pressed":t.selected,onClick:h},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},8,["size","color","icon-definition","trailing-icon-definition","icon-only","active","aria-pressed"]))}}),K=5;function Q(){const t=e.ref(null),u=e.ref(!1);let l=!1,a=0,o=0,s=!1,r=null;const h=d=>{t.value&&d.pointerType!=="mouse"&&(l=!0,s=!1,a=d.clientX,o=t.value.scrollLeft)},v=d=>{if(!l||!t.value)return;const c=d.clientX-a;!s&&Math.abs(c)>K&&(s=!0,u.value=!0,t.value.setPointerCapture(d.pointerId),r=d.pointerId),s&&(t.value.scrollLeft=o-c)},k=()=>{if(t.value&&r!==null){try{t.value.releasePointerCapture(r)}catch{}r=null}l=!1,s&&setTimeout(()=>u.value=!1,0)};return e.onBeforeUnmount(k),{el:t,suppressClick:u,dragHandlers:{onPointerdown:h,onPointermove:v,onPointerup:k,onPointerleave:k}}}const Y={key:0,class:"phila-filter-chip-group__label has-text-label-default"},J={class:"phila-filter-chip-group__viewport"},Z=e.defineComponent({__name:"FilterChipGroup",props:{filters:{},modelValue:{default:()=>({})},label:{},size:{default:"medium"},color:{default:"blue"},filterButton:{type:Boolean,default:!1},className:{}},emits:["update:modelValue","open-filters"],setup(t,{emit:u}){const l=t,a=u,o=e.computed(()=>{let i=0;for(const f of l.filters){if(f.excludeFromCount)continue;const n=l.modelValue[f.key];Array.isArray(n)?i+=n.length:typeof n=="string"?i+=n?1:0:n===!0&&(i+=1)}return i}),s=e.computed(()=>o.value>0?`Filters (${o.value} selected)`:"Filters"),{el:r,suppressClick:h,dragHandlers:v}=Q(),k=e.computed(()=>b.cn("phila-filter-chip-group",l.className));function d(i){return Array.isArray(i.choices)}function c(i,f){a("update:modelValue",{...l.modelValue,[i]:f})}function m(i){h.value&&(i.stopPropagation(),i.preventDefault())}const y=e.ref(!1),C=e.ref(!1);function g(){const i=r.value;i&&(y.value=i.scrollLeft>1,C.value=i.scrollLeft+i.clientWidth<i.scrollWidth-1)}function z(i){const f=r.value;f&&f.scrollBy({left:i*f.clientWidth*.8,behavior:"smooth"})}let x=null;return e.onMounted(()=>{e.nextTick(g),r.value&&(x=new ResizeObserver(()=>g()),x.observe(r.value))}),e.onBeforeUnmount(()=>{x?.disconnect(),x=null}),e.watch(()=>l.filters,()=>e.nextTick(g)),(i,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value)},[t.label?(e.openBlock(),e.createElementBlock("span",Y,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",J,[y.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"phila-filter-chip-group__arrow phila-filter-chip-group__arrow--left","aria-label":"Scroll filters left",onClick:f[0]||(f[0]=n=>z(-1))},[e.createVNode(e.unref(b.Icon),{"icon-definition":e.unref(w.faChevronLeft),size:"xxsmall",inline:"",decorative:""},null,8,["icon-definition"])])):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"el",ref:r,class:"phila-filter-chip-group__row"},e.unref(v),{onClickCapture:m,onScroll:g}),[t.filterButton?(e.openBlock(),e.createBlock(S,{key:0,size:t.size,color:t.color,"icon-definition":e.unref(w.faSliders),text:o.value>0?`(${o.value})`:"","icon-only":o.value===0,active:o.value>0,"aria-label":s.value,onClick:f[1]||(f[1]=n=>a("open-filters"))},null,8,["size","color","icon-definition","text","icon-only","active","aria-label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filters,n=>(e.openBlock(),e.createBlock(A,{key:n.key,label:n.label,text:n.label,size:t.size,color:t.color,"icon-definition":n.iconDefinition,choices:n.choices,multiple:n.multiple,"model-value":d(n)?t.modelValue[n.key]:void 0,selected:!d(n)&&t.modelValue[n.key]===!0,"onUpdate:modelValue":B=>c(n.key,B),"onUpdate:selected":B=>c(n.key,B)},null,8,["label","text","size","color","icon-definition","choices","multiple","model-value","selected","onUpdate:modelValue","onUpdate:selected"]))),128))],16),C.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"phila-filter-chip-group__arrow phila-filter-chip-group__arrow--right","aria-label":"Scroll filters right",onClick:f[2]||(f[2]=n=>z(1))},[e.createVNode(e.unref(b.Icon),{"icon-definition":e.unref(w.faChevronRight),size:"xxsmall",inline:"",decorative:""},null,8,["icon-definition"])])):e.createCommentVNode("",!0)])],2))}}),_=$(Z,[["__scopeId","data-v-99d3ffdf"]]);exports.FilterChip=A;exports.FilterChipGroup=_;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),b=require("@phila/phila-ui-core"),w=require("@fortawesome/pro-solid-svg-icons"),L=require("@phila/phila-ui-radio"),R=require("@phila/phila-ui-checkbox"),S=require("@phila/phila-ui-button"),F=["aria-pressed","aria-expanded"],E="xxsmall",U=e.defineComponent({__name:"FilterChipBase",props:{text:{default:void 0},size:{default:"medium"},color:{default:"blue"},iconDefinition:{default:void 0},iconColor:{default:void 0},trailingIconDefinition:{default:void 0},iconOnly:{type:Boolean,default:!1},active:{type:Boolean,default:!1},chevron:{type:Boolean,default:!1},ariaPressed:{type:Boolean},ariaExpanded:{type:Boolean}},emits:["click"],setup(t,{expose:u}){const l=t,a=e.ref(null),i=e.computed(()=>b.cn("phila-filter-chip",`phila-filter-chip--${l.color}`,l.size!=="medium"&&`is-${l.size}`,"has-text-body-"+s(l.size),l.active&&"is-active",l.iconOnly&&"is-icon-only"));u({el:a});const s=r=>{switch(r){case"extra-large":return"default";case"large":return"small";default:return"extra-small"}};return(r,h)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"rootEl",ref:a,type:"button",class:e.normalizeClass(i.value),style:e.normalizeStyle(t.iconColor?{"--chip-icon-color":t.iconColor}:void 0),"aria-pressed":t.ariaPressed,"aria-expanded":t.ariaExpanded,onClick:h[0]||(h[0]=v=>r.$emit("click",v))},[e.createVNode(e.unref(b.ActionContent),{"icon-definition":t.iconDefinition,size:t.size,inline:"","icon-size":E,"icon-only":t.iconOnly},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)],!0)]),_:3},8,["icon-definition","size","icon-only"]),t.chevron?(e.openBlock(),e.createBlock(e.unref(b.Icon),{key:0,"icon-definition":e.unref(w.faChevronDown),size:"xxsmall",inline:"",decorative:"",class:"phila-filter-chip__chevron"},null,8,["icon-definition"])):t.trailingIconDefinition?(e.openBlock(),e.createBlock(e.unref(b.Icon),{key:1,"icon-definition":t.trailingIconDefinition,size:E,inline:"",decorative:""},null,8,["icon-definition"])):e.createCommentVNode("",!0)],14,F))}}),$=(t,u)=>{const l=t.__vccOpts||t;for(const[a,i]of u)l[a]=i;return l},D=$(U,[["__scopeId","data-v-2925d75a"]]),M=["id","aria-label"],O={key:0,class:"phila-filter-chip-sheet__header"},q={class:"phila-filter-chip-sheet__title"},G={key:3,class:"phila-filter-chip-sheet__footer"},H={key:4,class:"phila-filter-chip-panel__footer"},W=e.defineComponent({__name:"FilterChipDropdownPanel",props:{menuId:{},label:{},choices:{},multiple:{type:Boolean},value:{},top:{},left:{},mobile:{type:Boolean,default:!1},applyText:{default:"Apply"},resetText:{default:"Reset"}},emits:["apply","reset","close"],setup(t,{emit:u}){const l=t,a=u,i=e.ref(typeof l.value=="string"?l.value:""),s=e.ref(Array.isArray(l.value)?[...l.value]:[]);e.watch(()=>l.value,c=>{l.multiple?s.value=Array.isArray(c)?[...c]:[]:i.value=typeof c=="string"?c:""});const r=e.computed(()=>l.choices.map(c=>({text:c.text,value:c.value}))),h=e.computed(()=>l.multiple?s.value.length:i.value?1:0),v=e.computed(()=>h.value>0?`${l.applyText} (${h.value})`:l.applyText),k=()=>{i.value="",s.value=[],a("reset")},d=()=>{a("apply",l.multiple?[...s.value]:i.value)};return(c,p)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.mobile?(e.openBlock(),e.createElementBlock("div",{key:0,class:"phila-filter-chip-sheet__scrim",onClick:p[0]||(p[0]=y=>a("close"))})):e.createCommentVNode("",!0),e.createElementVNode("div",{id:t.menuId,class:e.normalizeClass(t.mobile?"phila-filter-chip-sheet":"phila-filter-chip-panel"),role:"dialog","aria-label":t.label,style:e.normalizeStyle(t.mobile?void 0:{top:t.top+"px",left:t.left+"px"})},[t.mobile?(e.openBlock(),e.createElementBlock("header",O,[e.createElementVNode("span",q,e.toDisplayString(t.label),1),e.createElementVNode("button",{type:"button",class:"phila-filter-chip-sheet__close","aria-label":"Close",onClick:p[1]||(p[1]=y=>a("close"))}," ✕ ")])):e.createCommentVNode("",!0),t.multiple?(e.openBlock(),e.createBlock(e.unref(R.CheckboxGroup),{key:1,"group-label":t.label,choices:r.value,"model-value":s.value,"onUpdate:modelValue":p[2]||(p[2]=y=>s.value=y)},null,8,["group-label","choices","model-value"])):(e.openBlock(),e.createBlock(e.unref(L.RadioGroup),{key:2,"group-label":t.label,choices:r.value,"model-value":i.value,"onUpdate:modelValue":p[3]||(p[3]=y=>i.value=y)},null,8,["group-label","choices","model-value"])),t.mobile?(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(e.unref(S.PhilaButton),{variant:"secondary",text:t.resetText,onClick:k},null,8,["text"]),e.createVNode(e.unref(S.PhilaButton),{variant:"primary",text:v.value,onClick:d},null,8,["text"])])):(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("button",{type:"button",class:"phila-filter-chip-panel__reset has-text-body-small",onClick:k},e.toDisplayString(t.resetText),1),e.createVNode(e.unref(S.PhilaButton),{variant:"primary",size:"small",text:t.applyText,onClick:d},null,8,["text"])]))],14,M)]))}}),N="(max-width: 1064px) and (max-height: 915px)";function X(){const t=e.ref(typeof window<"u"&&window.matchMedia(N).matches);let u=null;function l(a){t.value=a.matches}return e.onMounted(()=>{u=window.matchMedia(N),t.value=u.matches,u.addEventListener("change",l)}),e.onBeforeUnmount(()=>{u?.removeEventListener("change",l)}),{isMobile:t}}let j=0;const A=e.defineComponent({__name:"FilterChip",props:{label:{default:void 0},text:{default:void 0},size:{default:"medium"},color:{default:"blue"},iconDefinition:{default:void 0},iconColor:{default:void 0},trailingIconDefinition:{default:void 0},selected:{type:Boolean,default:!1},choices:{default:void 0},multiple:{type:Boolean,default:!1},modelValue:{type:[String,Array,Boolean],default:void 0},applyText:{default:"Apply"},resetText:{default:"Reset"},className:{}},emits:["update:selected","update:modelValue","click"],setup(t,{emit:u}){const l=t,a=u,i=e.computed(()=>Array.isArray(l.choices)),s=e.useSlots(),r=e.computed(()=>!i.value&&!!l.iconDefinition&&!l.text&&!l.label&&!s.default);function h(m){a("update:selected",!l.selected),a("click",m)}const v=`phila-filter-chip-${e.useId()}-${++j}`,{isVisible:k,setVisibility:d}=b.useVisibility({id:v,group:"phila-filter-chip",outsideClickHide:!0,escapeKeyHide:!0,showSingle:!0}),c=e.computed(()=>k(v)),{isMobile:p}=X(),y=e.ref(null),B=e.ref(0),g=e.ref(0),z=e.computed(()=>l.multiple?Array.isArray(l.modelValue)?l.modelValue:[]:typeof l.modelValue=="string"?l.modelValue:""),x=e.computed(()=>l.multiple?Array.isArray(l.modelValue)&&l.modelValue.length>0:typeof l.modelValue=="string"&&l.modelValue!==""),n=e.computed(()=>l.multiple&&Array.isArray(l.modelValue)?l.modelValue.length:0),f=e.computed(()=>{const m=l.label??l.text??"";return n.value>0?`${m} (${n.value})`:m});function o(){const m=y.value?.el??null;if(!m)return;const V=m.getBoundingClientRect();B.value=V.bottom+4,g.value=V.left}function C(){c.value&&d(!1)}e.watch(c,m=>{m&&!p.value?window.addEventListener("scroll",C,{capture:!0}):window.removeEventListener("scroll",C,{capture:!0})});function T(){const m=!c.value;m&&!p.value&&o(),d(m)}function I(m){a("update:modelValue",m),d(!1)}function P(){a("update:modelValue",l.multiple?[]:"")}return(m,V)=>i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(D,{ref_key:"triggerRef",ref:y,text:f.value,size:t.size,color:t.color,"icon-definition":t.iconDefinition,"icon-color":t.iconColor,active:x.value||c.value,chevron:"","aria-expanded":c.value,"data-toggle":`visibility-${v}`,onClick:T},null,8,["text","size","color","icon-definition","icon-color","active","aria-expanded","data-toggle"]),c.value?(e.openBlock(),e.createBlock(W,{key:0,"menu-id":v,label:t.label??t.text??"",choices:t.choices,multiple:t.multiple,value:z.value,top:B.value,left:g.value,mobile:e.unref(p),"apply-text":t.applyText,"reset-text":t.resetText,onApply:I,onReset:P,onClose:V[0]||(V[0]=ee=>e.unref(d)(!1))},null,8,["label","choices","multiple","value","top","left","mobile","apply-text","reset-text"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(D,{key:1,size:t.size,color:t.color,"icon-definition":t.iconDefinition,"icon-color":t.iconColor,"trailing-icon-definition":t.trailingIconDefinition,"icon-only":r.value,active:t.selected,"aria-pressed":t.selected,onClick:h},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},8,["size","color","icon-definition","icon-color","trailing-icon-definition","icon-only","active","aria-pressed"]))}}),K=5;function Q(){const t=e.ref(null),u=e.ref(!1);let l=!1,a=0,i=0,s=!1,r=null;const h=d=>{t.value&&d.pointerType!=="mouse"&&(l=!0,s=!1,a=d.clientX,i=t.value.scrollLeft)},v=d=>{if(!l||!t.value)return;const c=d.clientX-a;!s&&Math.abs(c)>K&&(s=!0,u.value=!0,t.value.setPointerCapture(d.pointerId),r=d.pointerId),s&&(t.value.scrollLeft=i-c)},k=()=>{if(t.value&&r!==null){try{t.value.releasePointerCapture(r)}catch{}r=null}l=!1,s&&setTimeout(()=>u.value=!1,0)};return e.onBeforeUnmount(k),{el:t,suppressClick:u,dragHandlers:{onPointerdown:h,onPointermove:v,onPointerup:k,onPointerleave:k}}}const Y={key:0,class:"phila-filter-chip-group__label has-text-label-default"},J={class:"phila-filter-chip-group__viewport"},Z=e.defineComponent({__name:"FilterChipGroup",props:{filters:{},modelValue:{default:()=>({})},label:{},size:{default:"medium"},color:{default:"blue"},filterButton:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},className:{}},emits:["update:modelValue","open-filters"],setup(t,{emit:u}){const l=t,a=u,i=e.computed(()=>{let n=0;for(const f of l.filters){if(f.excludeFromCount)continue;const o=l.modelValue[f.key];Array.isArray(o)?n+=o.length:typeof o=="string"?n+=o?1:0:o===!0&&(n+=1)}return n}),s=e.computed(()=>i.value>0?`Filters (${i.value} selected)`:"Filters"),{el:r,suppressClick:h,dragHandlers:v}=Q(),k=e.computed(()=>b.cn("phila-filter-chip-group",l.elevated&&"is-elevated",l.className));function d(n){return Array.isArray(n.choices)}function c(n,f){a("update:modelValue",{...l.modelValue,[n]:f})}function p(n){h.value&&(n.stopPropagation(),n.preventDefault())}const y=e.ref(!1),B=e.ref(!1);function g(){const n=r.value;n&&(y.value=n.scrollLeft>1,B.value=n.scrollLeft+n.clientWidth<n.scrollWidth-1)}function z(n){const f=r.value;f&&f.scrollBy({left:n*f.clientWidth*.8,behavior:"smooth"})}let x=null;return e.onMounted(()=>{e.nextTick(g),r.value&&(x=new ResizeObserver(()=>g()),x.observe(r.value))}),e.onBeforeUnmount(()=>{x?.disconnect(),x=null}),e.watch(()=>l.filters,()=>e.nextTick(g)),(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value)},[t.label?(e.openBlock(),e.createElementBlock("span",Y,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",J,[y.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"phila-filter-chip-group__arrow phila-filter-chip-group__arrow--left","aria-label":"Scroll filters left",onClick:f[0]||(f[0]=o=>z(-1))},[e.createVNode(e.unref(b.Icon),{"icon-definition":e.unref(w.faChevronLeft),size:"xxsmall",inline:"",decorative:""},null,8,["icon-definition"])])):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"el",ref:r,class:"phila-filter-chip-group__row"},e.unref(v),{onClickCapture:p,onScroll:g}),[t.filterButton?(e.openBlock(),e.createBlock(D,{key:0,size:t.size,color:t.color,"icon-definition":e.unref(w.faSliders),text:i.value>0?`(${i.value})`:"","icon-only":i.value===0,active:i.value>0,"aria-label":s.value,onClick:f[1]||(f[1]=o=>a("open-filters"))},null,8,["size","color","icon-definition","text","icon-only","active","aria-label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filters,o=>(e.openBlock(),e.createBlock(A,{key:o.key,label:o.label,text:o.label,size:t.size,color:t.color,"icon-definition":o.iconDefinition,"icon-color":o.iconColor,choices:o.choices,multiple:o.multiple,"model-value":d(o)?t.modelValue[o.key]:void 0,selected:!d(o)&&t.modelValue[o.key]===!0,"onUpdate:modelValue":C=>c(o.key,C),"onUpdate:selected":C=>c(o.key,C)},null,8,["label","text","size","color","icon-definition","icon-color","choices","multiple","model-value","selected","onUpdate:modelValue","onUpdate:selected"]))),128))],16),B.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"phila-filter-chip-group__arrow phila-filter-chip-group__arrow--right","aria-label":"Scroll filters right",onClick:f[2]||(f[2]=o=>z(1))},[e.createVNode(e.unref(b.Icon),{"icon-definition":e.unref(w.faChevronRight),size:"xxsmall",inline:"",decorative:""},null,8,["icon-definition"])])):e.createCommentVNode("",!0)])],2))}}),_=$(Z,[["__scopeId","data-v-9c777e02"]]);exports.FilterChip=A;exports.FilterChipGroup=_;
|
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as R, ref as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { faChevronDown as
|
|
1
|
+
import { defineComponent as R, ref as C, computed as h, createElementBlock as g, openBlock as c, normalizeStyle as W, normalizeClass as M, createVNode as D, createBlock as V, createCommentVNode as z, unref as v, withCtx as X, renderSlot as q, createTextVNode as K, toDisplayString as I, watch as O, Teleport as le, createElementVNode as A, onMounted as Q, onBeforeUnmount as U, useSlots as te, useId as ie, Fragment as Y, nextTick as N, mergeProps as oe, renderList as ne } from "vue";
|
|
2
|
+
import { cn as j, ActionContent as ae, Icon as L, useVisibility as re } from "@phila/phila-ui-core";
|
|
3
|
+
import { faChevronDown as ce, faChevronLeft as se, faSliders as ue, faChevronRight as de } from "@fortawesome/pro-solid-svg-icons";
|
|
4
4
|
import { RadioGroup as fe } from "@phila/phila-ui-radio";
|
|
5
|
-
import { CheckboxGroup as
|
|
5
|
+
import { CheckboxGroup as ve } from "@phila/phila-ui-checkbox";
|
|
6
6
|
import { PhilaButton as E } from "@phila/phila-ui-button";
|
|
7
|
-
import './index.css';const
|
|
7
|
+
import './index.css';const me = ["aria-pressed", "aria-expanded"], H = "xxsmall", pe = /* @__PURE__ */ R({
|
|
8
8
|
__name: "FilterChipBase",
|
|
9
9
|
props: {
|
|
10
10
|
text: { default: void 0 },
|
|
11
11
|
size: { default: "medium" },
|
|
12
12
|
color: { default: "blue" },
|
|
13
13
|
iconDefinition: { default: void 0 },
|
|
14
|
+
iconColor: { default: void 0 },
|
|
14
15
|
trailingIconDefinition: { default: void 0 },
|
|
15
16
|
iconOnly: { type: Boolean, default: !1 },
|
|
16
17
|
active: { type: Boolean, default: !1 },
|
|
@@ -19,19 +20,19 @@ import './index.css';const ve = ["aria-pressed", "aria-expanded"], H = "xxsmall"
|
|
|
19
20
|
ariaExpanded: { type: Boolean }
|
|
20
21
|
},
|
|
21
22
|
emits: ["click"],
|
|
22
|
-
setup(e, { expose:
|
|
23
|
-
const l = e, n =
|
|
24
|
-
() =>
|
|
23
|
+
setup(e, { expose: s }) {
|
|
24
|
+
const l = e, n = C(null), i = h(
|
|
25
|
+
() => j(
|
|
25
26
|
"phila-filter-chip",
|
|
26
27
|
`phila-filter-chip--${l.color}`,
|
|
27
28
|
l.size !== "medium" && `is-${l.size}`,
|
|
28
|
-
"has-text-body-" +
|
|
29
|
+
"has-text-body-" + u(l.size),
|
|
29
30
|
l.active && "is-active",
|
|
30
31
|
l.iconOnly && "is-icon-only"
|
|
31
32
|
)
|
|
32
33
|
);
|
|
33
|
-
|
|
34
|
-
const
|
|
34
|
+
s({ el: n });
|
|
35
|
+
const u = (r) => {
|
|
35
36
|
switch (r) {
|
|
36
37
|
case "extra-large":
|
|
37
38
|
return "default";
|
|
@@ -41,51 +42,52 @@ import './index.css';const ve = ["aria-pressed", "aria-expanded"], H = "xxsmall"
|
|
|
41
42
|
return "extra-small";
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
|
-
return (r, b) => (
|
|
45
|
+
return (r, b) => (c(), g("button", {
|
|
45
46
|
ref_key: "rootEl",
|
|
46
47
|
ref: n,
|
|
47
48
|
type: "button",
|
|
48
|
-
class: M(
|
|
49
|
+
class: M(i.value),
|
|
50
|
+
style: W(e.iconColor ? { "--chip-icon-color": e.iconColor } : void 0),
|
|
49
51
|
"aria-pressed": e.ariaPressed,
|
|
50
52
|
"aria-expanded": e.ariaExpanded,
|
|
51
53
|
onClick: b[0] || (b[0] = (y) => r.$emit("click", y))
|
|
52
54
|
}, [
|
|
53
|
-
D(
|
|
55
|
+
D(v(ae), {
|
|
54
56
|
"icon-definition": e.iconDefinition,
|
|
55
57
|
size: e.size,
|
|
56
58
|
inline: "",
|
|
57
59
|
"icon-size": H,
|
|
58
60
|
"icon-only": e.iconOnly
|
|
59
61
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
default: X(() => [
|
|
63
|
+
q(r.$slots, "default", {}, () => [
|
|
64
|
+
K(I(e.text), 1)
|
|
63
65
|
], !0)
|
|
64
66
|
]),
|
|
65
67
|
_: 3
|
|
66
68
|
}, 8, ["icon-definition", "size", "icon-only"]),
|
|
67
|
-
e.chevron ? (
|
|
69
|
+
e.chevron ? (c(), V(v(L), {
|
|
68
70
|
key: 0,
|
|
69
|
-
"icon-definition":
|
|
71
|
+
"icon-definition": v(ce),
|
|
70
72
|
size: "xxsmall",
|
|
71
73
|
inline: "",
|
|
72
74
|
decorative: "",
|
|
73
75
|
class: "phila-filter-chip__chevron"
|
|
74
|
-
}, null, 8, ["icon-definition"])) : e.trailingIconDefinition ? (
|
|
76
|
+
}, null, 8, ["icon-definition"])) : e.trailingIconDefinition ? (c(), V(v(L), {
|
|
75
77
|
key: 1,
|
|
76
78
|
"icon-definition": e.trailingIconDefinition,
|
|
77
79
|
size: H,
|
|
78
80
|
inline: "",
|
|
79
81
|
decorative: ""
|
|
80
82
|
}, null, 8, ["icon-definition"])) : z("", !0)
|
|
81
|
-
],
|
|
83
|
+
], 14, me));
|
|
82
84
|
}
|
|
83
|
-
}),
|
|
85
|
+
}), J = (e, s) => {
|
|
84
86
|
const l = e.__vccOpts || e;
|
|
85
|
-
for (const [n,
|
|
86
|
-
l[n] =
|
|
87
|
+
for (const [n, i] of s)
|
|
88
|
+
l[n] = i;
|
|
87
89
|
return l;
|
|
88
|
-
}, F = /* @__PURE__ */
|
|
90
|
+
}, F = /* @__PURE__ */ J(pe, [["__scopeId", "data-v-2925d75a"]]), he = ["id", "aria-label"], ye = {
|
|
89
91
|
key: 0,
|
|
90
92
|
class: "phila-filter-chip-sheet__header"
|
|
91
93
|
}, be = { class: "phila-filter-chip-sheet__title" }, xe = {
|
|
@@ -94,7 +96,7 @@ import './index.css';const ve = ["aria-pressed", "aria-expanded"], H = "xxsmall"
|
|
|
94
96
|
}, ge = {
|
|
95
97
|
key: 4,
|
|
96
98
|
class: "phila-filter-chip-panel__footer"
|
|
97
|
-
},
|
|
99
|
+
}, Ce = /* @__PURE__ */ R({
|
|
98
100
|
__name: "FilterChipDropdownPanel",
|
|
99
101
|
props: {
|
|
100
102
|
menuId: {},
|
|
@@ -109,74 +111,74 @@ import './index.css';const ve = ["aria-pressed", "aria-expanded"], H = "xxsmall"
|
|
|
109
111
|
resetText: { default: "Reset" }
|
|
110
112
|
},
|
|
111
113
|
emits: ["apply", "reset", "close"],
|
|
112
|
-
setup(e, { emit:
|
|
113
|
-
const l = e, n =
|
|
114
|
+
setup(e, { emit: s }) {
|
|
115
|
+
const l = e, n = s, i = C(typeof l.value == "string" ? l.value : ""), u = C(Array.isArray(l.value) ? [...l.value] : []);
|
|
114
116
|
O(
|
|
115
117
|
() => l.value,
|
|
116
118
|
(a) => {
|
|
117
|
-
l.multiple ?
|
|
119
|
+
l.multiple ? u.value = Array.isArray(a) ? [...a] : [] : i.value = typeof a == "string" ? a : "";
|
|
118
120
|
}
|
|
119
121
|
);
|
|
120
|
-
const r = h(() => l.choices.map((a) => ({ text: a.text, value: a.value }))), b = h(() => l.multiple ?
|
|
122
|
+
const r = h(() => l.choices.map((a) => ({ text: a.text, value: a.value }))), b = h(() => l.multiple ? u.value.length : i.value ? 1 : 0), y = h(
|
|
121
123
|
() => b.value > 0 ? `${l.applyText} (${b.value})` : l.applyText
|
|
122
|
-
),
|
|
123
|
-
|
|
124
|
+
), k = () => {
|
|
125
|
+
i.value = "", u.value = [], n("reset");
|
|
124
126
|
}, d = () => {
|
|
125
|
-
n("apply", l.multiple ? [...
|
|
127
|
+
n("apply", l.multiple ? [...u.value] : i.value);
|
|
126
128
|
};
|
|
127
|
-
return (a,
|
|
128
|
-
e.mobile ? (
|
|
129
|
+
return (a, p) => (c(), V(le, { to: "body" }, [
|
|
130
|
+
e.mobile ? (c(), g("div", {
|
|
129
131
|
key: 0,
|
|
130
132
|
class: "phila-filter-chip-sheet__scrim",
|
|
131
|
-
onClick:
|
|
133
|
+
onClick: p[0] || (p[0] = (x) => n("close"))
|
|
132
134
|
})) : z("", !0),
|
|
133
135
|
A("div", {
|
|
134
136
|
id: e.menuId,
|
|
135
137
|
class: M(e.mobile ? "phila-filter-chip-sheet" : "phila-filter-chip-panel"),
|
|
136
138
|
role: "dialog",
|
|
137
139
|
"aria-label": e.label,
|
|
138
|
-
style:
|
|
140
|
+
style: W(e.mobile ? void 0 : { top: e.top + "px", left: e.left + "px" })
|
|
139
141
|
}, [
|
|
140
|
-
e.mobile ? (
|
|
142
|
+
e.mobile ? (c(), g("header", ye, [
|
|
141
143
|
A("span", be, I(e.label), 1),
|
|
142
144
|
A("button", {
|
|
143
145
|
type: "button",
|
|
144
146
|
class: "phila-filter-chip-sheet__close",
|
|
145
147
|
"aria-label": "Close",
|
|
146
|
-
onClick:
|
|
148
|
+
onClick: p[1] || (p[1] = (x) => n("close"))
|
|
147
149
|
}, " ✕ ")
|
|
148
150
|
])) : z("", !0),
|
|
149
|
-
e.multiple ? (
|
|
151
|
+
e.multiple ? (c(), V(v(ve), {
|
|
150
152
|
key: 1,
|
|
151
153
|
"group-label": e.label,
|
|
152
154
|
choices: r.value,
|
|
153
|
-
"model-value":
|
|
154
|
-
"onUpdate:modelValue":
|
|
155
|
-
}, null, 8, ["group-label", "choices", "model-value"])) : (
|
|
155
|
+
"model-value": u.value,
|
|
156
|
+
"onUpdate:modelValue": p[2] || (p[2] = (x) => u.value = x)
|
|
157
|
+
}, null, 8, ["group-label", "choices", "model-value"])) : (c(), V(v(fe), {
|
|
156
158
|
key: 2,
|
|
157
159
|
"group-label": e.label,
|
|
158
160
|
choices: r.value,
|
|
159
|
-
"model-value":
|
|
160
|
-
"onUpdate:modelValue":
|
|
161
|
+
"model-value": i.value,
|
|
162
|
+
"onUpdate:modelValue": p[3] || (p[3] = (x) => i.value = x)
|
|
161
163
|
}, null, 8, ["group-label", "choices", "model-value"])),
|
|
162
|
-
e.mobile ? (
|
|
163
|
-
D(
|
|
164
|
+
e.mobile ? (c(), g("div", xe, [
|
|
165
|
+
D(v(E), {
|
|
164
166
|
variant: "secondary",
|
|
165
167
|
text: e.resetText,
|
|
166
|
-
onClick:
|
|
168
|
+
onClick: k
|
|
167
169
|
}, null, 8, ["text"]),
|
|
168
|
-
D(
|
|
170
|
+
D(v(E), {
|
|
169
171
|
variant: "primary",
|
|
170
172
|
text: y.value,
|
|
171
173
|
onClick: d
|
|
172
174
|
}, null, 8, ["text"])
|
|
173
|
-
])) : (
|
|
175
|
+
])) : (c(), g("div", ge, [
|
|
174
176
|
A("button", {
|
|
175
177
|
type: "button",
|
|
176
178
|
class: "phila-filter-chip-panel__reset has-text-body-small",
|
|
177
|
-
onClick:
|
|
179
|
+
onClick: k
|
|
178
180
|
}, I(e.resetText), 1),
|
|
179
|
-
D(
|
|
181
|
+
D(v(E), {
|
|
180
182
|
variant: "primary",
|
|
181
183
|
size: "small",
|
|
182
184
|
text: e.applyText,
|
|
@@ -187,16 +189,16 @@ import './index.css';const ve = ["aria-pressed", "aria-expanded"], H = "xxsmall"
|
|
|
187
189
|
]));
|
|
188
190
|
}
|
|
189
191
|
}), G = "(max-width: 1064px) and (max-height: 915px)";
|
|
190
|
-
function
|
|
191
|
-
const e =
|
|
192
|
-
let
|
|
192
|
+
function ke() {
|
|
193
|
+
const e = C(typeof window < "u" && window.matchMedia(G).matches);
|
|
194
|
+
let s = null;
|
|
193
195
|
function l(n) {
|
|
194
196
|
e.value = n.matches;
|
|
195
197
|
}
|
|
196
|
-
return
|
|
197
|
-
|
|
198
|
+
return Q(() => {
|
|
199
|
+
s = window.matchMedia(G), e.value = s.matches, s.addEventListener("change", l);
|
|
198
200
|
}), U(() => {
|
|
199
|
-
|
|
201
|
+
s?.removeEventListener("change", l);
|
|
200
202
|
}), { isMobile: e };
|
|
201
203
|
}
|
|
202
204
|
let Ve = 0;
|
|
@@ -208,6 +210,7 @@ const ze = /* @__PURE__ */ R({
|
|
|
208
210
|
size: { default: "medium" },
|
|
209
211
|
color: { default: "blue" },
|
|
210
212
|
iconDefinition: { default: void 0 },
|
|
213
|
+
iconColor: { default: void 0 },
|
|
211
214
|
trailingIconDefinition: { default: void 0 },
|
|
212
215
|
selected: { type: Boolean, default: !1 },
|
|
213
216
|
choices: { default: void 0 },
|
|
@@ -218,46 +221,46 @@ const ze = /* @__PURE__ */ R({
|
|
|
218
221
|
className: {}
|
|
219
222
|
},
|
|
220
223
|
emits: ["update:selected", "update:modelValue", "click"],
|
|
221
|
-
setup(e, { emit:
|
|
222
|
-
const l = e, n =
|
|
223
|
-
() => !
|
|
224
|
+
setup(e, { emit: s }) {
|
|
225
|
+
const l = e, n = s, i = h(() => Array.isArray(l.choices)), u = te(), r = h(
|
|
226
|
+
() => !i.value && !!l.iconDefinition && !l.text && !l.label && !u.default
|
|
224
227
|
);
|
|
225
|
-
function b(
|
|
226
|
-
n("update:selected", !l.selected), n("click",
|
|
228
|
+
function b(m) {
|
|
229
|
+
n("update:selected", !l.selected), n("click", m);
|
|
227
230
|
}
|
|
228
|
-
const y = `phila-filter-chip-${ie()}-${++Ve}`, { isVisible:
|
|
231
|
+
const y = `phila-filter-chip-${ie()}-${++Ve}`, { isVisible: k, setVisibility: d } = re({
|
|
229
232
|
id: y,
|
|
230
233
|
group: "phila-filter-chip",
|
|
231
234
|
outsideClickHide: !0,
|
|
232
235
|
escapeKeyHide: !0,
|
|
233
236
|
showSingle: !0
|
|
234
|
-
}), a = h(() =>
|
|
235
|
-
const
|
|
236
|
-
return
|
|
237
|
+
}), a = h(() => k(y)), { isMobile: p } = ke(), x = C(null), S = C(0), w = C(0), P = h(() => l.multiple ? Array.isArray(l.modelValue) ? l.modelValue : [] : typeof l.modelValue == "string" ? l.modelValue : ""), $ = h(() => l.multiple ? Array.isArray(l.modelValue) && l.modelValue.length > 0 : typeof l.modelValue == "string" && l.modelValue !== ""), o = h(() => l.multiple && Array.isArray(l.modelValue) ? l.modelValue.length : 0), f = h(() => {
|
|
238
|
+
const m = l.label ?? l.text ?? "";
|
|
239
|
+
return o.value > 0 ? `${m} (${o.value})` : m;
|
|
237
240
|
});
|
|
238
|
-
function
|
|
239
|
-
const
|
|
240
|
-
if (!
|
|
241
|
-
const T =
|
|
241
|
+
function t() {
|
|
242
|
+
const m = x.value?.el ?? null;
|
|
243
|
+
if (!m) return;
|
|
244
|
+
const T = m.getBoundingClientRect();
|
|
242
245
|
S.value = T.bottom + 4, w.value = T.left;
|
|
243
246
|
}
|
|
244
247
|
function B() {
|
|
245
248
|
a.value && d(!1);
|
|
246
249
|
}
|
|
247
|
-
O(a, (
|
|
248
|
-
|
|
250
|
+
O(a, (m) => {
|
|
251
|
+
m && !p.value ? window.addEventListener("scroll", B, { capture: !0 }) : window.removeEventListener("scroll", B, { capture: !0 });
|
|
249
252
|
});
|
|
250
|
-
function
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
+
function Z() {
|
|
254
|
+
const m = !a.value;
|
|
255
|
+
m && !p.value && t(), d(m);
|
|
253
256
|
}
|
|
254
|
-
function
|
|
255
|
-
n("update:modelValue",
|
|
257
|
+
function _(m) {
|
|
258
|
+
n("update:modelValue", m), d(!1);
|
|
256
259
|
}
|
|
257
|
-
function
|
|
260
|
+
function ee() {
|
|
258
261
|
n("update:modelValue", l.multiple ? [] : "");
|
|
259
262
|
}
|
|
260
|
-
return (
|
|
263
|
+
return (m, T) => i.value ? (c(), g(Y, { key: 0 }, [
|
|
261
264
|
D(F, {
|
|
262
265
|
ref_key: "triggerRef",
|
|
263
266
|
ref: x,
|
|
@@ -265,13 +268,14 @@ const ze = /* @__PURE__ */ R({
|
|
|
265
268
|
size: e.size,
|
|
266
269
|
color: e.color,
|
|
267
270
|
"icon-definition": e.iconDefinition,
|
|
271
|
+
"icon-color": e.iconColor,
|
|
268
272
|
active: $.value || a.value,
|
|
269
273
|
chevron: "",
|
|
270
274
|
"aria-expanded": a.value,
|
|
271
275
|
"data-toggle": `visibility-${y}`,
|
|
272
|
-
onClick:
|
|
273
|
-
}, null, 8, ["text", "size", "color", "icon-definition", "active", "aria-expanded", "data-toggle"]),
|
|
274
|
-
a.value ? (
|
|
276
|
+
onClick: Z
|
|
277
|
+
}, null, 8, ["text", "size", "color", "icon-definition", "icon-color", "active", "aria-expanded", "data-toggle"]),
|
|
278
|
+
a.value ? (c(), V(Ce, {
|
|
275
279
|
key: 0,
|
|
276
280
|
"menu-id": y,
|
|
277
281
|
label: e.label ?? e.text ?? "",
|
|
@@ -280,43 +284,44 @@ const ze = /* @__PURE__ */ R({
|
|
|
280
284
|
value: P.value,
|
|
281
285
|
top: S.value,
|
|
282
286
|
left: w.value,
|
|
283
|
-
mobile: p
|
|
287
|
+
mobile: v(p),
|
|
284
288
|
"apply-text": e.applyText,
|
|
285
289
|
"reset-text": e.resetText,
|
|
286
|
-
onApply:
|
|
287
|
-
onReset:
|
|
288
|
-
onClose: T[0] || (T[0] = (Se) =>
|
|
290
|
+
onApply: _,
|
|
291
|
+
onReset: ee,
|
|
292
|
+
onClose: T[0] || (T[0] = (Se) => v(d)(!1))
|
|
289
293
|
}, null, 8, ["label", "choices", "multiple", "value", "top", "left", "mobile", "apply-text", "reset-text"])) : z("", !0)
|
|
290
|
-
], 64)) : (
|
|
294
|
+
], 64)) : (c(), V(F, {
|
|
291
295
|
key: 1,
|
|
292
296
|
size: e.size,
|
|
293
297
|
color: e.color,
|
|
294
298
|
"icon-definition": e.iconDefinition,
|
|
299
|
+
"icon-color": e.iconColor,
|
|
295
300
|
"trailing-icon-definition": e.trailingIconDefinition,
|
|
296
301
|
"icon-only": r.value,
|
|
297
302
|
active: e.selected,
|
|
298
303
|
"aria-pressed": e.selected,
|
|
299
304
|
onClick: b
|
|
300
305
|
}, {
|
|
301
|
-
default:
|
|
302
|
-
|
|
303
|
-
|
|
306
|
+
default: X(() => [
|
|
307
|
+
q(m.$slots, "default", {}, () => [
|
|
308
|
+
K(I(e.text), 1)
|
|
304
309
|
])
|
|
305
310
|
]),
|
|
306
311
|
_: 3
|
|
307
|
-
}, 8, ["size", "color", "icon-definition", "trailing-icon-definition", "icon-only", "active", "aria-pressed"]));
|
|
312
|
+
}, 8, ["size", "color", "icon-definition", "icon-color", "trailing-icon-definition", "icon-only", "active", "aria-pressed"]));
|
|
308
313
|
}
|
|
309
314
|
}), we = 5;
|
|
310
315
|
function De() {
|
|
311
|
-
const e =
|
|
312
|
-
let l = !1, n = 0,
|
|
316
|
+
const e = C(null), s = C(!1);
|
|
317
|
+
let l = !1, n = 0, i = 0, u = !1, r = null;
|
|
313
318
|
const b = (d) => {
|
|
314
|
-
e.value && d.pointerType !== "mouse" && (l = !0,
|
|
319
|
+
e.value && d.pointerType !== "mouse" && (l = !0, u = !1, n = d.clientX, i = e.value.scrollLeft);
|
|
315
320
|
}, y = (d) => {
|
|
316
321
|
if (!l || !e.value) return;
|
|
317
322
|
const a = d.clientX - n;
|
|
318
|
-
!
|
|
319
|
-
},
|
|
323
|
+
!u && Math.abs(a) > we && (u = !0, s.value = !0, e.value.setPointerCapture(d.pointerId), r = d.pointerId), u && (e.value.scrollLeft = i - a);
|
|
324
|
+
}, k = () => {
|
|
320
325
|
if (e.value && r !== null) {
|
|
321
326
|
try {
|
|
322
327
|
e.value.releasePointerCapture(r);
|
|
@@ -324,16 +329,16 @@ function De() {
|
|
|
324
329
|
}
|
|
325
330
|
r = null;
|
|
326
331
|
}
|
|
327
|
-
l = !1,
|
|
332
|
+
l = !1, u && setTimeout(() => s.value = !1, 0);
|
|
328
333
|
};
|
|
329
|
-
return U(
|
|
334
|
+
return U(k), {
|
|
330
335
|
el: e,
|
|
331
|
-
suppressClick:
|
|
336
|
+
suppressClick: s,
|
|
332
337
|
dragHandlers: {
|
|
333
338
|
onPointerdown: b,
|
|
334
339
|
onPointermove: y,
|
|
335
|
-
onPointerup:
|
|
336
|
-
onPointerleave:
|
|
340
|
+
onPointerup: k,
|
|
341
|
+
onPointerleave: k
|
|
337
342
|
}
|
|
338
343
|
};
|
|
339
344
|
}
|
|
@@ -349,61 +354,62 @@ const $e = {
|
|
|
349
354
|
size: { default: "medium" },
|
|
350
355
|
color: { default: "blue" },
|
|
351
356
|
filterButton: { type: Boolean, default: !1 },
|
|
357
|
+
elevated: { type: Boolean, default: !1 },
|
|
352
358
|
className: {}
|
|
353
359
|
},
|
|
354
360
|
emits: ["update:modelValue", "open-filters"],
|
|
355
|
-
setup(e, { emit:
|
|
356
|
-
const l = e, n =
|
|
357
|
-
let
|
|
361
|
+
setup(e, { emit: s }) {
|
|
362
|
+
const l = e, n = s, i = h(() => {
|
|
363
|
+
let o = 0;
|
|
358
364
|
for (const f of l.filters) {
|
|
359
365
|
if (f.excludeFromCount) continue;
|
|
360
|
-
const
|
|
361
|
-
Array.isArray(
|
|
366
|
+
const t = l.modelValue[f.key];
|
|
367
|
+
Array.isArray(t) ? o += t.length : typeof t == "string" ? o += t ? 1 : 0 : t === !0 && (o += 1);
|
|
362
368
|
}
|
|
363
|
-
return
|
|
364
|
-
}),
|
|
365
|
-
() =>
|
|
366
|
-
), { el: r, suppressClick: b, dragHandlers: y } = De(),
|
|
367
|
-
function d(
|
|
368
|
-
return Array.isArray(
|
|
369
|
+
return o;
|
|
370
|
+
}), u = h(
|
|
371
|
+
() => i.value > 0 ? `Filters (${i.value} selected)` : "Filters"
|
|
372
|
+
), { el: r, suppressClick: b, dragHandlers: y } = De(), k = h(() => j("phila-filter-chip-group", l.elevated && "is-elevated", l.className));
|
|
373
|
+
function d(o) {
|
|
374
|
+
return Array.isArray(o.choices);
|
|
369
375
|
}
|
|
370
|
-
function a(
|
|
371
|
-
n("update:modelValue", { ...l.modelValue, [
|
|
376
|
+
function a(o, f) {
|
|
377
|
+
n("update:modelValue", { ...l.modelValue, [o]: f });
|
|
372
378
|
}
|
|
373
|
-
function
|
|
374
|
-
b.value && (
|
|
379
|
+
function p(o) {
|
|
380
|
+
b.value && (o.stopPropagation(), o.preventDefault());
|
|
375
381
|
}
|
|
376
|
-
const x =
|
|
382
|
+
const x = C(!1), S = C(!1);
|
|
377
383
|
function w() {
|
|
378
|
-
const
|
|
379
|
-
|
|
384
|
+
const o = r.value;
|
|
385
|
+
o && (x.value = o.scrollLeft > 1, S.value = o.scrollLeft + o.clientWidth < o.scrollWidth - 1);
|
|
380
386
|
}
|
|
381
|
-
function P(
|
|
387
|
+
function P(o) {
|
|
382
388
|
const f = r.value;
|
|
383
|
-
f && f.scrollBy({ left:
|
|
389
|
+
f && f.scrollBy({ left: o * f.clientWidth * 0.8, behavior: "smooth" });
|
|
384
390
|
}
|
|
385
391
|
let $ = null;
|
|
386
|
-
return
|
|
392
|
+
return Q(() => {
|
|
387
393
|
N(w), r.value && ($ = new ResizeObserver(() => w()), $.observe(r.value));
|
|
388
394
|
}), U(() => {
|
|
389
395
|
$?.disconnect(), $ = null;
|
|
390
396
|
}), O(
|
|
391
397
|
() => l.filters,
|
|
392
398
|
() => N(w)
|
|
393
|
-
), (
|
|
394
|
-
class: M(
|
|
399
|
+
), (o, f) => (c(), g("div", {
|
|
400
|
+
class: M(k.value)
|
|
395
401
|
}, [
|
|
396
|
-
e.label ? (
|
|
402
|
+
e.label ? (c(), g("span", $e, I(e.label), 1)) : z("", !0),
|
|
397
403
|
A("div", Be, [
|
|
398
|
-
x.value ? (
|
|
404
|
+
x.value ? (c(), g("button", {
|
|
399
405
|
key: 0,
|
|
400
406
|
type: "button",
|
|
401
407
|
class: "phila-filter-chip-group__arrow phila-filter-chip-group__arrow--left",
|
|
402
408
|
"aria-label": "Scroll filters left",
|
|
403
|
-
onClick: f[0] || (f[0] = (
|
|
409
|
+
onClick: f[0] || (f[0] = (t) => P(-1))
|
|
404
410
|
}, [
|
|
405
|
-
D(
|
|
406
|
-
"icon-definition":
|
|
411
|
+
D(v(L), {
|
|
412
|
+
"icon-definition": v(se),
|
|
407
413
|
size: "xxsmall",
|
|
408
414
|
inline: "",
|
|
409
415
|
decorative: ""
|
|
@@ -413,45 +419,46 @@ const $e = {
|
|
|
413
419
|
ref_key: "el",
|
|
414
420
|
ref: r,
|
|
415
421
|
class: "phila-filter-chip-group__row"
|
|
416
|
-
},
|
|
417
|
-
onClickCapture:
|
|
422
|
+
}, v(y), {
|
|
423
|
+
onClickCapture: p,
|
|
418
424
|
onScroll: w
|
|
419
425
|
}), [
|
|
420
|
-
e.filterButton ? (
|
|
426
|
+
e.filterButton ? (c(), V(F, {
|
|
421
427
|
key: 0,
|
|
422
428
|
size: e.size,
|
|
423
429
|
color: e.color,
|
|
424
|
-
"icon-definition":
|
|
425
|
-
text:
|
|
426
|
-
"icon-only":
|
|
427
|
-
active:
|
|
428
|
-
"aria-label":
|
|
429
|
-
onClick: f[1] || (f[1] = (
|
|
430
|
+
"icon-definition": v(ue),
|
|
431
|
+
text: i.value > 0 ? `(${i.value})` : "",
|
|
432
|
+
"icon-only": i.value === 0,
|
|
433
|
+
active: i.value > 0,
|
|
434
|
+
"aria-label": u.value,
|
|
435
|
+
onClick: f[1] || (f[1] = (t) => n("open-filters"))
|
|
430
436
|
}, null, 8, ["size", "color", "icon-definition", "text", "icon-only", "active", "aria-label"])) : z("", !0),
|
|
431
|
-
(
|
|
432
|
-
key:
|
|
433
|
-
label:
|
|
434
|
-
text:
|
|
437
|
+
(c(!0), g(Y, null, ne(e.filters, (t) => (c(), V(ze, {
|
|
438
|
+
key: t.key,
|
|
439
|
+
label: t.label,
|
|
440
|
+
text: t.label,
|
|
435
441
|
size: e.size,
|
|
436
442
|
color: e.color,
|
|
437
|
-
"icon-definition":
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
"onUpdate:
|
|
444
|
-
|
|
443
|
+
"icon-definition": t.iconDefinition,
|
|
444
|
+
"icon-color": t.iconColor,
|
|
445
|
+
choices: t.choices,
|
|
446
|
+
multiple: t.multiple,
|
|
447
|
+
"model-value": d(t) ? e.modelValue[t.key] : void 0,
|
|
448
|
+
selected: !d(t) && e.modelValue[t.key] === !0,
|
|
449
|
+
"onUpdate:modelValue": (B) => a(t.key, B),
|
|
450
|
+
"onUpdate:selected": (B) => a(t.key, B)
|
|
451
|
+
}, null, 8, ["label", "text", "size", "color", "icon-definition", "icon-color", "choices", "multiple", "model-value", "selected", "onUpdate:modelValue", "onUpdate:selected"]))), 128))
|
|
445
452
|
], 16),
|
|
446
|
-
S.value ? (
|
|
453
|
+
S.value ? (c(), g("button", {
|
|
447
454
|
key: 1,
|
|
448
455
|
type: "button",
|
|
449
456
|
class: "phila-filter-chip-group__arrow phila-filter-chip-group__arrow--right",
|
|
450
457
|
"aria-label": "Scroll filters right",
|
|
451
|
-
onClick: f[2] || (f[2] = (
|
|
458
|
+
onClick: f[2] || (f[2] = (t) => P(1))
|
|
452
459
|
}, [
|
|
453
|
-
D(
|
|
454
|
-
"icon-definition":
|
|
460
|
+
D(v(L), {
|
|
461
|
+
"icon-definition": v(de),
|
|
455
462
|
size: "xxsmall",
|
|
456
463
|
inline: "",
|
|
457
464
|
decorative: ""
|
|
@@ -460,7 +467,7 @@ const $e = {
|
|
|
460
467
|
])
|
|
461
468
|
], 2));
|
|
462
469
|
}
|
|
463
|
-
}), Fe = /* @__PURE__ */
|
|
470
|
+
}), Fe = /* @__PURE__ */ J(Ae, [["__scopeId", "data-v-9c777e02"]]);
|
|
464
471
|
export {
|
|
465
472
|
ze as FilterChip,
|
|
466
473
|
Fe as FilterChipGroup
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phila/phila-ui-filter-chip",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Filter chips for faceted filtering",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@fortawesome/pro-solid-svg-icons": "^7.1.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@phila/phila-ui-core": "3.0.0-beta.
|
|
34
|
-
"@phila/phila-ui-
|
|
35
|
-
"@phila/phila-ui-
|
|
36
|
-
"@phila/phila-ui-button": "2.2.3-beta.
|
|
33
|
+
"@phila/phila-ui-core": "3.0.0-beta.5",
|
|
34
|
+
"@phila/phila-ui-radio": "0.1.1-beta.6",
|
|
35
|
+
"@phila/phila-ui-checkbox": "0.1.1-beta.6",
|
|
36
|
+
"@phila/phila-ui-button": "2.2.3-beta.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^24.0.0",
|