@phila/phila-ui-checkbox 0.1.1-beta.6 → 0.1.1-beta.8

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/dist/index.css CHANGED
@@ -1 +1 @@
1
- .checkbox-svg .checkbox-bg{fill:var(--Schemes-Surface-Bright, #fafafa);stroke:var(--Schemes-Border, #cfcfcf);stroke-width:1}.checkbox-svg .checkbox-check{stroke:none;fill:none}.checkbox-svg--checked .checkbox-bg{fill:var(--Schemes-Primary, #0f33f5);stroke:var(--Schemes-Primary, #0f33f5)}.checkbox-svg--checked .checkbox-check{stroke:var(--Schemes-On-Primary, #ffffff);stroke-width:2}.philaCheckbox[data-v-354b2e5e]{position:relative;display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.philaCheckbox__visual[data-v-354b2e5e]{display:flex;align-items:center;gap:var(--spacing-s, .75rem)}.philaCheckbox--icon-only .philaCheckbox__visual[data-v-354b2e5e]{gap:0}.philaCheckbox input[data-v-354b2e5e]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}[data-v-354b2e5e] .checkbox-svg{flex-shrink:0;overflow:visible}.philaCheckbox[data-v-354b2e5e]:focus-within{outline:2px solid var(--Schemes-Primary, #0f33f5);outline-offset:2px}.philaCheckbox-enabled[data-v-354b2e5e]:hover .checkbox-svg .checkbox-bg{stroke:var(--Schemes-Primary, #0f33f5);stroke-width:2}.philaCheckbox-error[data-v-354b2e5e] .checkbox-svg .checkbox-bg{stroke:var(--Schemes-Error, #cc0406);stroke-width:2}.philaCheckbox-disabled[data-v-354b2e5e]{cursor:not-allowed;color:var(--Schemes-Surface-Variant, #a2a2a2)}.philaCheckbox-disabled[data-v-354b2e5e] .checkbox-svg .checkbox-bg{stroke:var(--Schemes-Surface-Dim, #cfcfcf);stroke-width:1;fill:var(--Schemes-Surface-Bright, #fafafa)}.philaCheckbox-disabled[data-v-354b2e5e] .checkbox-svg--checked .checkbox-bg{fill:var(--Schemes-Surface-Dim, #cfcfcf);stroke:var(--Schemes-Surface-Dim, #cfcfcf)}.philaCheckbox-disabled[data-v-354b2e5e] .checkbox-svg--checked .checkbox-check{stroke:var(--Schemes-Surface-Bright, #fafafa);stroke-width:2}.group-container[data-v-1408bdad]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-xs, .5rem)}.labels-container[data-v-1408bdad]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-2xs, .25rem);align-self:stretch}span[data-v-1408bdad]{display:block}.checkbox-container[data-v-1408bdad]{display:flex;padding:var(--spacing-m, 1rem);flex-direction:column;align-items:flex-start;gap:var(--Radio-margin-bottom, 1rem);align-self:stretch}.checkbox-container-error[data-v-1408bdad]{border-radius:var(--border-radius-m, .75rem)}.error-message[data-v-1408bdad]{display:flex;align-items:center;gap:var(--spacing-s, .75rem);align-self:stretch;font-weight:600}
1
+ .checkbox-svg .checkbox-bg{fill:var(--Schemes-Surface-Bright, #fafafa);stroke:var(--Schemes-Border, #cfcfcf);stroke-width:1}.checkbox-svg .checkbox-check{stroke:none;fill:none}.checkbox-svg--checked .checkbox-bg{fill:var(--Schemes-Primary, #0f33f5);stroke:var(--Schemes-Primary, #0f33f5)}.checkbox-svg--checked .checkbox-check{stroke:var(--Schemes-On-Primary, #ffffff);stroke-width:2}.philaCheckbox[data-v-354b2e5e]{position:relative;display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.philaCheckbox__visual[data-v-354b2e5e]{display:flex;align-items:center;gap:var(--spacing-s, .75rem)}.philaCheckbox--icon-only .philaCheckbox__visual[data-v-354b2e5e]{gap:0}.philaCheckbox input[data-v-354b2e5e]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}[data-v-354b2e5e] .checkbox-svg{flex-shrink:0;overflow:visible}.philaCheckbox[data-v-354b2e5e]:focus-within{outline:2px solid var(--Schemes-Primary, #0f33f5);outline-offset:2px}.philaCheckbox-enabled[data-v-354b2e5e]:hover .checkbox-svg .checkbox-bg{stroke:var(--Schemes-Primary, #0f33f5);stroke-width:2}.philaCheckbox-error[data-v-354b2e5e] .checkbox-svg .checkbox-bg{stroke:var(--Schemes-Error, #cc0406);stroke-width:2}.philaCheckbox-disabled[data-v-354b2e5e]{cursor:not-allowed;color:var(--Schemes-Surface-Variant, #a2a2a2)}.philaCheckbox-disabled[data-v-354b2e5e] .checkbox-svg .checkbox-bg{stroke:var(--Schemes-Surface-Dim, #cfcfcf);stroke-width:1;fill:var(--Schemes-Surface-Bright, #fafafa)}.philaCheckbox-disabled[data-v-354b2e5e] .checkbox-svg--checked .checkbox-bg{fill:var(--Schemes-Surface-Dim, #cfcfcf);stroke:var(--Schemes-Surface-Dim, #cfcfcf)}.philaCheckbox-disabled[data-v-354b2e5e] .checkbox-svg--checked .checkbox-check{stroke:var(--Schemes-Surface-Bright, #fafafa);stroke-width:2}.group-container[data-v-38f469d0]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-xs, .5rem)}.labels-container[data-v-38f469d0]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-2xs, .25rem);align-self:stretch}span[data-v-38f469d0]{display:block}.checkbox-container[data-v-38f469d0]{display:flex;padding:var(--spacing-m, 1rem);flex-direction:column;align-items:flex-start;gap:var(--Radio-margin-bottom, 1rem);align-self:stretch}.checkbox-container-error[data-v-38f469d0]{border-radius:var(--border-radius-m, .75rem)}.error-message[data-v-38f469d0]{display:flex;align-items:center;gap:var(--spacing-s, .75rem);align-self:stretch;font-weight:600}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),s=require("@phila/phila-ui-core"),h=e.defineComponent({__name:"CheckboxIcon",props:{checked:{type:Boolean}},setup(a){return(c,o)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["checkbox-svg",{"checkbox-svg--checked":a.checked}]),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[...o[0]||(o[0]=[e.createElementVNode("rect",{class:"checkbox-bg",x:"1",y:"1",width:"18",height:"18",rx:"3",ry:"3"},null,-1),e.createElementVNode("path",{class:"checkbox-check",d:"M 4.5 10 L 8.5 14 L 15.5 6","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],2))}}),f={class:"philaCheckbox__visual"},v={key:0},g=["name","value","checked","disabled"],C=e.defineComponent({__name:"Checkbox",props:{name:{},value:{type:[String,Number,Boolean]},modelValue:{type:[Boolean,Array]},text:{},disabled:{type:Boolean},error:{type:Boolean},indeterminate:{type:Boolean},className:{}},emits:["update:modelValue","change","focus","blur"],setup(a,{emit:c}){const o=a,n=c,l=e.ref(null);e.watchEffect(()=>{l.value&&(l.value.indeterminate=o.indeterminate??!1)});const d=e.computed(()=>Array.isArray(o.modelValue)?o.modelValue.includes(o.value):!!o.modelValue);function m(u){if(Array.isArray(o.modelValue)){const t=[...o.modelValue],r=o.value,i=t.indexOf(r);i===-1?t.push(r):t.splice(i,1),n("update:modelValue",t)}else n("update:modelValue",!o.modelValue);n("change",u)}const p=e.computed(()=>s.cn("philaCheckbox","has-text-body-default",o.className,!o.disabled&&"philaCheckbox-enabled",o.disabled&&"philaCheckbox-disabled",o.error&&"philaCheckbox-error",!o.text&&"philaCheckbox--icon-only"));return(u,t)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(p.value)},[e.createElementVNode("span",f,[e.createVNode(h,{checked:d.value},null,8,["checked"]),o.text?(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(o.text),1)):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"inputRef",ref:l,type:"checkbox",name:o.name,value:o.value,checked:d.value,disabled:o.disabled,onChange:m,onFocus:t[0]||(t[0]=r=>n("focus",r)),onBlur:t[1]||(t[1]=r=>n("blur",r))},null,40,g)],2))}}),k=(a,c)=>{const o=a.__vccOpts||a;for(const[n,l]of c)o[n]=l;return o},b=k(C,[["__scopeId","data-v-354b2e5e"]]);var y={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]};const _={class:"labels-container"},V={class:"has-text-body-default"},B={key:0,class:"error-message has-text-error content"},N=e.defineComponent({__name:"CheckboxGroup",props:{groupLabel:{},description:{},choices:{},modelValue:{},error:{type:Boolean},errorMessage:{},disabled:{type:Boolean},className:{}},emits:["update:modelValue"],setup(a,{emit:c}){const o=a,n=c,l=s.generateRandomId(),d=e.computed(()=>s.cn("group-container",o.className)),m=e.computed(()=>s.cn("checkbox-container",o.error&&"checkbox-container-error has-background-error")),p=e.computed(()=>s.cn("has-text-label-default",o.error&&"has-text-error"));function u(t){n("update:modelValue",t)}return(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("div",_,[e.createElementVNode("span",{class:e.normalizeClass(p.value)},e.toDisplayString(a.groupLabel),3),e.createElementVNode("span",V,e.toDisplayString(a.description),1)]),e.createElementVNode("div",{class:e.normalizeClass(m.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.choices,(i,x)=>(e.openBlock(),e.createBlock(b,{key:e.unref(l)+x,name:e.unref(l),value:i.value,text:i.text,"model-value":o.modelValue,disabled:o.disabled,error:o.error,"onUpdate:modelValue":u},null,8,["name","value","text","model-value","disabled","error"]))),128)),o.error?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(s.Icon),{style:{height:"fit-content",width:"fit-content",padding:"0"},size:"large",inline:"","aria-hidden":"true","icon-definition":e.unref(y)},null,8,["icon-definition"]),e.createTextVNode(" "+e.toDisplayString(a.errorMessage),1)])):e.createCommentVNode("",!0)],2)],2))}}),E=k(N,[["__scopeId","data-v-1408bdad"]]);exports.Checkbox=b;exports.CheckboxGroup=E;exports.CheckboxIcon=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),s=require("@phila/phila-ui-core"),f=require("@phila/phila-ui-core/icons"),h=e.defineComponent({__name:"CheckboxIcon",props:{checked:{type:Boolean}},setup(a){return(c,o)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["checkbox-svg",{"checkbox-svg--checked":a.checked}]),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[...o[0]||(o[0]=[e.createElementVNode("rect",{class:"checkbox-bg",x:"1",y:"1",width:"18",height:"18",rx:"3",ry:"3"},null,-1),e.createElementVNode("path",{class:"checkbox-check",d:"M 4.5 10 L 8.5 14 L 15.5 6","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],2))}}),v={class:"philaCheckbox__visual"},g={key:0},C=["name","value","checked","disabled"],y=e.defineComponent({__name:"Checkbox",props:{name:{},value:{type:[String,Number,Boolean]},modelValue:{type:[Boolean,Array]},text:{},disabled:{type:Boolean},error:{type:Boolean},indeterminate:{type:Boolean},className:{}},emits:["update:modelValue","change","focus","blur"],setup(a,{emit:c}){const o=a,n=c,l=e.ref(null);e.watchEffect(()=>{l.value&&(l.value.indeterminate=o.indeterminate??!1)});const i=e.computed(()=>Array.isArray(o.modelValue)?o.modelValue.includes(o.value):!!o.modelValue);function m(u){if(Array.isArray(o.modelValue)){const t=[...o.modelValue],r=o.value,d=t.indexOf(r);d===-1?t.push(r):t.splice(d,1),n("update:modelValue",t)}else n("update:modelValue",!o.modelValue);n("change",u)}const p=e.computed(()=>s.cn("philaCheckbox","has-text-body-default",o.className,!o.disabled&&"philaCheckbox-enabled",o.disabled&&"philaCheckbox-disabled",o.error&&"philaCheckbox-error",!o.text&&"philaCheckbox--icon-only"));return(u,t)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(p.value)},[e.createElementVNode("span",v,[e.createVNode(h,{checked:i.value},null,8,["checked"]),o.text?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(o.text),1)):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"inputRef",ref:l,type:"checkbox",name:o.name,value:o.value,checked:i.value,disabled:o.disabled,onChange:m,onFocus:t[0]||(t[0]=r=>n("focus",r)),onBlur:t[1]||(t[1]=r=>n("blur",r))},null,40,C)],2))}}),k=(a,c)=>{const o=a.__vccOpts||a;for(const[n,l]of c)o[n]=l;return o},b=k(y,[["__scopeId","data-v-354b2e5e"]]),_={class:"labels-container"},V={class:"has-text-body-default"},B={key:0,class:"error-message has-text-error content"},N=e.defineComponent({__name:"CheckboxGroup",props:{groupLabel:{},description:{},choices:{},modelValue:{},error:{type:Boolean},errorMessage:{},disabled:{type:Boolean},className:{}},emits:["update:modelValue"],setup(a,{emit:c}){const o=a,n=c,l=s.generateRandomId(),i=e.computed(()=>s.cn("group-container",o.className)),m=e.computed(()=>s.cn("checkbox-container",o.error&&"checkbox-container-error has-background-error")),p=e.computed(()=>s.cn("has-text-label-default",o.error&&"has-text-error"));function u(t){n("update:modelValue",t)}return(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value)},[e.createElementVNode("div",_,[e.createElementVNode("span",{class:e.normalizeClass(p.value)},e.toDisplayString(a.groupLabel),3),e.createElementVNode("span",V,e.toDisplayString(a.description),1)]),e.createElementVNode("div",{class:e.normalizeClass(m.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.choices,(d,x)=>(e.openBlock(),e.createBlock(b,{key:e.unref(l)+x,name:e.unref(l),value:d.value,text:d.text,"model-value":o.modelValue,disabled:o.disabled,error:o.error,"onUpdate:modelValue":u},null,8,["name","value","text","model-value","disabled","error"]))),128)),o.error?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(s.Icon),{style:{height:"fit-content",width:"fit-content",padding:"0"},size:"large",inline:"","aria-hidden":"true",icon:e.unref(f.IconCircleExclamation)},null,8,["icon"]),e.createTextVNode(" "+e.toDisplayString(a.errorMessage),1)])):e.createCommentVNode("",!0)],2)],2))}}),E=k(N,[["__scopeId","data-v-38f469d0"]]);exports.Checkbox=b;exports.CheckboxGroup=E;exports.CheckboxIcon=h;
package/dist/index.mjs CHANGED
@@ -1,13 +1,14 @@
1
- import { defineComponent as _, createElementBlock as i, openBlock as c, normalizeClass as u, createElementVNode as l, ref as B, watchEffect as N, computed as h, createVNode as g, createCommentVNode as y, toDisplayString as b, Fragment as w, renderList as I, createBlock as z, unref as x, createTextVNode as A } from "vue";
2
- import { cn as k, generateRandomId as L, Icon as $ } from "@phila/phila-ui-core";
3
- import './index.css';const E = /* @__PURE__ */ _({
1
+ import { defineComponent as _, createElementBlock as d, openBlock as s, normalizeClass as u, createElementVNode as r, ref as B, watchEffect as N, computed as h, createVNode as g, createCommentVNode as y, toDisplayString as x, Fragment as w, renderList as I, createBlock as A, unref as b, createTextVNode as L } from "vue";
2
+ import { cn as k, generateRandomId as $, Icon as E } from "@phila/phila-ui-core";
3
+ import { IconCircleExclamation as M } from "@phila/phila-ui-core/icons";
4
+ import './index.css';const R = /* @__PURE__ */ _({
4
5
  __name: "CheckboxIcon",
5
6
  props: {
6
7
  checked: { type: Boolean }
7
8
  },
8
- setup(t) {
9
- return (s, e) => (c(), i("svg", {
10
- class: u(["checkbox-svg", { "checkbox-svg--checked": t.checked }]),
9
+ setup(o) {
10
+ return (c, e) => (s(), d("svg", {
11
+ class: u(["checkbox-svg", { "checkbox-svg--checked": o.checked }]),
11
12
  width: "20",
12
13
  height: "20",
13
14
  viewBox: "0 0 20 20",
@@ -15,7 +16,7 @@ import './index.css';const E = /* @__PURE__ */ _({
15
16
  xmlns: "http://www.w3.org/2000/svg",
16
17
  "aria-hidden": "true"
17
18
  }, [...e[0] || (e[0] = [
18
- l("rect", {
19
+ r("rect", {
19
20
  class: "checkbox-bg",
20
21
  x: "1",
21
22
  y: "1",
@@ -24,7 +25,7 @@ import './index.css';const E = /* @__PURE__ */ _({
24
25
  rx: "3",
25
26
  ry: "3"
26
27
  }, null, -1),
27
- l("path", {
28
+ r("path", {
28
29
  class: "checkbox-check",
29
30
  d: "M 4.5 10 L 8.5 14 L 15.5 6",
30
31
  "stroke-linecap": "round",
@@ -32,7 +33,7 @@ import './index.css';const E = /* @__PURE__ */ _({
32
33
  }, null, -1)
33
34
  ])], 2));
34
35
  }
35
- }), M = { class: "philaCheckbox__visual" }, R = { key: 0 }, F = ["name", "value", "checked", "disabled"], G = /* @__PURE__ */ _({
36
+ }), z = { class: "philaCheckbox__visual" }, F = { key: 0 }, G = ["name", "value", "checked", "disabled"], O = /* @__PURE__ */ _({
36
37
  __name: "Checkbox",
37
38
  props: {
38
39
  name: {},
@@ -45,19 +46,19 @@ import './index.css';const E = /* @__PURE__ */ _({
45
46
  className: {}
46
47
  },
47
48
  emits: ["update:modelValue", "change", "focus", "blur"],
48
- setup(t, { emit: s }) {
49
- const e = t, o = s, n = B(null);
49
+ setup(o, { emit: c }) {
50
+ const e = o, a = c, n = B(null);
50
51
  N(() => {
51
52
  n.value && (n.value.indeterminate = e.indeterminate ?? !1);
52
53
  });
53
54
  const m = h(() => Array.isArray(e.modelValue) ? e.modelValue.includes(e.value) : !!e.modelValue);
54
55
  function f(p) {
55
56
  if (Array.isArray(e.modelValue)) {
56
- const a = [...e.modelValue], r = e.value, d = a.indexOf(r);
57
- d === -1 ? a.push(r) : a.splice(d, 1), o("update:modelValue", a);
57
+ const t = [...e.modelValue], l = e.value, i = t.indexOf(l);
58
+ i === -1 ? t.push(l) : t.splice(i, 1), a("update:modelValue", t);
58
59
  } else
59
- o("update:modelValue", !e.modelValue);
60
- o("change", p);
60
+ a("update:modelValue", !e.modelValue);
61
+ a("change", p);
61
62
  }
62
63
  const v = h(() => k(
63
64
  "philaCheckbox",
@@ -68,14 +69,14 @@ import './index.css';const E = /* @__PURE__ */ _({
68
69
  e.error && "philaCheckbox-error",
69
70
  !e.text && "philaCheckbox--icon-only"
70
71
  ));
71
- return (p, a) => (c(), i("label", {
72
+ return (p, t) => (s(), d("label", {
72
73
  class: u(v.value)
73
74
  }, [
74
- l("span", M, [
75
- g(E, { checked: m.value }, null, 8, ["checked"]),
76
- e.text ? (c(), i("span", R, b(e.text), 1)) : y("", !0)
75
+ r("span", z, [
76
+ g(R, { checked: m.value }, null, 8, ["checked"]),
77
+ e.text ? (s(), d("span", F, x(e.text), 1)) : y("", !0)
77
78
  ]),
78
- l("input", {
79
+ r("input", {
79
80
  ref_key: "inputRef",
80
81
  ref: n,
81
82
  type: "checkbox",
@@ -84,23 +85,17 @@ import './index.css';const E = /* @__PURE__ */ _({
84
85
  checked: m.value,
85
86
  disabled: e.disabled,
86
87
  onChange: f,
87
- onFocus: a[0] || (a[0] = (r) => o("focus", r)),
88
- onBlur: a[1] || (a[1] = (r) => o("blur", r))
89
- }, null, 40, F)
88
+ onFocus: t[0] || (t[0] = (l) => a("focus", l)),
89
+ onBlur: t[1] || (t[1] = (l) => a("blur", l))
90
+ }, null, 40, G)
90
91
  ], 2));
91
92
  }
92
- }), C = (t, s) => {
93
- const e = t.__vccOpts || t;
94
- for (const [o, n] of s)
95
- e[o] = n;
93
+ }), C = (o, c) => {
94
+ const e = o.__vccOpts || o;
95
+ for (const [a, n] of c)
96
+ e[a] = n;
96
97
  return e;
97
- }, O = /* @__PURE__ */ C(G, [["__scopeId", "data-v-354b2e5e"]]);
98
- var S = {
99
- prefix: "fas",
100
- iconName: "circle-exclamation",
101
- icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
102
- };
103
- const U = { class: "labels-container" }, j = { class: "has-text-body-default" }, D = {
98
+ }, S = /* @__PURE__ */ C(O, [["__scopeId", "data-v-354b2e5e"]]), U = { class: "labels-container" }, j = { class: "has-text-body-default" }, D = {
104
99
  key: 0,
105
100
  class: "error-message has-text-error content"
106
101
  }, T = /* @__PURE__ */ _({
@@ -116,49 +111,49 @@ const U = { class: "labels-container" }, j = { class: "has-text-body-default" },
116
111
  className: {}
117
112
  },
118
113
  emits: ["update:modelValue"],
119
- setup(t, { emit: s }) {
120
- const e = t, o = s, n = L(), m = h(() => k("group-container", e.className)), f = h(() => k("checkbox-container", e.error && "checkbox-container-error has-background-error")), v = h(() => k("has-text-label-default", e.error && "has-text-error"));
121
- function p(a) {
122
- o("update:modelValue", a);
114
+ setup(o, { emit: c }) {
115
+ const e = o, a = c, n = $(), m = h(() => k("group-container", e.className)), f = h(() => k("checkbox-container", e.error && "checkbox-container-error has-background-error")), v = h(() => k("has-text-label-default", e.error && "has-text-error"));
116
+ function p(t) {
117
+ a("update:modelValue", t);
123
118
  }
124
- return (a, r) => (c(), i("div", {
119
+ return (t, l) => (s(), d("div", {
125
120
  class: u(m.value)
126
121
  }, [
127
- l("div", U, [
128
- l("span", {
122
+ r("div", U, [
123
+ r("span", {
129
124
  class: u(v.value)
130
- }, b(t.groupLabel), 3),
131
- l("span", j, b(t.description), 1)
125
+ }, x(o.groupLabel), 3),
126
+ r("span", j, x(o.description), 1)
132
127
  ]),
133
- l("div", {
128
+ r("div", {
134
129
  class: u(f.value)
135
130
  }, [
136
- (c(!0), i(w, null, I(e.choices, (d, V) => (c(), z(O, {
137
- key: x(n) + V,
138
- name: x(n),
139
- value: d.value,
140
- text: d.text,
131
+ (s(!0), d(w, null, I(e.choices, (i, V) => (s(), A(S, {
132
+ key: b(n) + V,
133
+ name: b(n),
134
+ value: i.value,
135
+ text: i.text,
141
136
  "model-value": e.modelValue,
142
137
  disabled: e.disabled,
143
138
  error: e.error,
144
139
  "onUpdate:modelValue": p
145
140
  }, null, 8, ["name", "value", "text", "model-value", "disabled", "error"]))), 128)),
146
- e.error ? (c(), i("div", D, [
147
- g(x($), {
141
+ e.error ? (s(), d("div", D, [
142
+ g(b(E), {
148
143
  style: { height: "fit-content", width: "fit-content", padding: "0" },
149
144
  size: "large",
150
145
  inline: "",
151
146
  "aria-hidden": "true",
152
- "icon-definition": x(S)
153
- }, null, 8, ["icon-definition"]),
154
- A(" " + b(t.errorMessage), 1)
147
+ icon: b(M)
148
+ }, null, 8, ["icon"]),
149
+ L(" " + x(o.errorMessage), 1)
155
150
  ])) : y("", !0)
156
151
  ], 2)
157
152
  ], 2));
158
153
  }
159
- }), J = /* @__PURE__ */ C(T, [["__scopeId", "data-v-1408bdad"]]);
154
+ }), K = /* @__PURE__ */ C(T, [["__scopeId", "data-v-38f469d0"]]);
160
155
  export {
161
- O as Checkbox,
162
- J as CheckboxGroup,
163
- E as CheckboxIcon
156
+ S as Checkbox,
157
+ K as CheckboxGroup,
158
+ R as CheckboxIcon
164
159
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phila/phila-ui-checkbox",
3
- "version": "0.1.1-beta.6",
3
+ "version": "0.1.1-beta.8",
4
4
  "type": "module",
5
5
  "description": "A checkbox input.",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "vue": "^3.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@phila/phila-ui-core": "3.0.0-beta.5"
31
+ "@phila/phila-ui-core": "3.0.0-beta.7"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^24.0.0",