@paperless/core 2.0.1-beta.36 → 2.0.1-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/build/{p-75d49d43.js → p-43992afc.js} +1 -1
- package/dist/build/p-60f4b734.entry.js +2 -0
- package/dist/build/p-60f4b734.entry.js.map +1 -0
- package/dist/build/p-a9a85ce4.entry.js +2 -0
- package/dist/build/p-a9a85ce4.entry.js.map +1 -0
- package/dist/build/p-dc8258c0.entry.js +2 -0
- package/dist/build/p-dc8258c0.entry.js.map +1 -0
- package/dist/build/p-ff6356cb.entry.js +2 -0
- package/dist/build/p-ff6356cb.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-checkbox_2.cjs.entry.js +16 -11
- package/dist/cjs/p-checkbox_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown-menu-item_4.cjs.entry.js +1 -1
- package/dist/cjs/p-dropdown-menu-item_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-radio.cjs.entry.js +6 -15
- package/dist/cjs/p-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/p-toggle.cjs.entry.js +8 -43
- package/dist/cjs/p-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/checkbox/checkbox.component.css +1 -1
- package/dist/collection/components/atoms/checkbox/checkbox.component.js +15 -30
- package/dist/collection/components/atoms/checkbox/checkbox.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -1
- package/dist/collection/components/atoms/radio/radio.component.css +1 -1
- package/dist/collection/components/atoms/radio/radio.component.js +5 -34
- package/dist/collection/components/atoms/radio/radio.component.js.map +1 -1
- package/dist/collection/components/atoms/toggle/toggle.component.css +1 -1
- package/dist/collection/components/atoms/toggle/toggle.component.js +7 -62
- package/dist/collection/components/atoms/toggle/toggle.component.js.map +1 -1
- package/dist/components/checkbox.component.js +16 -12
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/dropdown-menu-item.component.js +1 -1
- package/dist/components/dropdown-menu-item.component.js.map +1 -1
- package/dist/components/p-radio.js +6 -16
- package/dist/components/p-radio.js.map +1 -1
- package/dist/components/p-toggle.js +8 -44
- package/dist/components/p-toggle.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-checkbox_2.entry.js +16 -11
- package/dist/esm/p-checkbox_2.entry.js.map +1 -1
- package/dist/esm/p-dropdown-menu-item_4.entry.js +1 -1
- package/dist/esm/p-dropdown-menu-item_4.entry.js.map +1 -1
- package/dist/esm/p-radio.entry.js +6 -15
- package/dist/esm/p-radio.entry.js.map +1 -1
- package/dist/esm/p-toggle.entry.js +8 -43
- package/dist/esm/p-toggle.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-60f4b734.entry.js +2 -0
- package/dist/paperless/p-60f4b734.entry.js.map +1 -0
- package/dist/paperless/p-a9a85ce4.entry.js +2 -0
- package/dist/paperless/p-a9a85ce4.entry.js.map +1 -0
- package/dist/paperless/p-dc8258c0.entry.js +2 -0
- package/dist/paperless/p-dc8258c0.entry.js.map +1 -0
- package/dist/paperless/p-ff6356cb.entry.js +2 -0
- package/dist/paperless/p-ff6356cb.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/checkbox/checkbox.component.d.ts +0 -4
- package/dist/types/components/atoms/radio/radio.component.d.ts +0 -4
- package/dist/types/components/atoms/toggle/toggle.component.d.ts +0 -4
- package/dist/types/components.d.ts +0 -24
- package/hydrate/index.js +31 -73
- package/hydrate/index.mjs +31 -73
- package/package.json +1 -1
- package/dist/build/p-489013c7.entry.js +0 -2
- package/dist/build/p-489013c7.entry.js.map +0 -1
- package/dist/build/p-8857d619.entry.js +0 -2
- package/dist/build/p-8857d619.entry.js.map +0 -1
- package/dist/build/p-99352ae4.entry.js +0 -2
- package/dist/build/p-99352ae4.entry.js.map +0 -1
- package/dist/build/p-d2ddf504.entry.js +0 -2
- package/dist/build/p-d2ddf504.entry.js.map +0 -1
- package/dist/paperless/p-489013c7.entry.js +0 -2
- package/dist/paperless/p-489013c7.entry.js.map +0 -1
- package/dist/paperless/p-8857d619.entry.js +0 -2
- package/dist/paperless/p-8857d619.entry.js.map +0 -1
- package/dist/paperless/p-99352ae4.entry.js +0 -2
- package/dist/paperless/p-99352ae4.entry.js.map +0 -1
- package/dist/paperless/p-d2ddf504.entry.js +0 -2
- package/dist/paperless/p-d2ddf504.entry.js.map +0 -1
|
@@ -4,12 +4,9 @@ import { nonce } from "../../../utils/nonce";
|
|
|
4
4
|
const radio = cva([
|
|
5
5
|
'peer appearance-none m-0 outline-none flex-shrink-0',
|
|
6
6
|
'rounded-full border border-inset border-solid ',
|
|
7
|
+
'w-4 h-4',
|
|
7
8
|
], {
|
|
8
9
|
variants: {
|
|
9
|
-
size: {
|
|
10
|
-
sm: 'w-4 h-4',
|
|
11
|
-
base: 'w-6 h-6',
|
|
12
|
-
},
|
|
13
10
|
disabled: {
|
|
14
11
|
false: [
|
|
15
12
|
'cursor-pointer shadow-1',
|
|
@@ -38,12 +35,9 @@ const circle = cva([
|
|
|
38
35
|
'block',
|
|
39
36
|
'rounded-full bg-transparent',
|
|
40
37
|
'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',
|
|
38
|
+
'w-2 h-2',
|
|
41
39
|
], {
|
|
42
40
|
variants: {
|
|
43
|
-
size: {
|
|
44
|
-
sm: 'w-2 h-2',
|
|
45
|
-
base: 'w-3 h-3',
|
|
46
|
-
},
|
|
47
41
|
disabled: {
|
|
48
42
|
false: 'peer-checked:bg-white peer-checked:ring-1 peer-checked:ring-black-teal/10',
|
|
49
43
|
true: 'peer-checked:bg-black-teal-200',
|
|
@@ -53,7 +47,6 @@ const circle = cva([
|
|
|
53
47
|
export class Radio {
|
|
54
48
|
constructor() {
|
|
55
49
|
this.value = undefined;
|
|
56
|
-
this.size = 'base';
|
|
57
50
|
this.disabled = false;
|
|
58
51
|
this.required = true;
|
|
59
52
|
this.id = undefined;
|
|
@@ -66,13 +59,11 @@ export class Radio {
|
|
|
66
59
|
*/
|
|
67
60
|
checkedChange;
|
|
68
61
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
70
|
-
size: this.size,
|
|
62
|
+
return (h(Host, { key: '658055a3fe8964f1b9aacac6328589378ecb5e65', class: 'p-radio' }, h("label", { key: 'd26499f5c5f959670fa60039c462d30376258742', htmlFor: this.id ?? this._nonce, class: 'flex items-center justify-start gap-2 text-black-teal' }, h("div", { key: 'd8e90dc7b26edf3d0d4c5c9c3d4d2f204723fef8', class: 'relative flex flex-shrink-0 items-center' }, h("input", { key: '893f998e9a7a7a91c830c1f2cdcca3b7ed2a7a7e', class: radio({
|
|
71
63
|
disabled: this.disabled,
|
|
72
|
-
}), type: 'radio', id: this.id ?? this._nonce, name: this.name, required: this.required, value: this.value, checked: this.checked, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '
|
|
73
|
-
size: this.size,
|
|
64
|
+
}), type: 'radio', id: this.id ?? this._nonce, name: this.name, required: this.required, value: this.value, checked: this.checked, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '22413291018ffbc803f31c6211bb99531581cc4f', class: circle({
|
|
74
65
|
disabled: this.disabled,
|
|
75
|
-
}) })), h("slot", { key: '
|
|
66
|
+
}) })), h("slot", { key: 'b30677ea30eff5805a87b108029a2cb21405c502' }))));
|
|
76
67
|
}
|
|
77
68
|
_onChange(ev) {
|
|
78
69
|
if (this.disabled) {
|
|
@@ -115,26 +106,6 @@ export class Radio {
|
|
|
115
106
|
"attribute": "value",
|
|
116
107
|
"reflect": false
|
|
117
108
|
},
|
|
118
|
-
"size": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"mutable": false,
|
|
121
|
-
"complexType": {
|
|
122
|
-
"original": "'sm' | 'base'",
|
|
123
|
-
"resolved": "\"base\" | \"sm\"",
|
|
124
|
-
"references": {}
|
|
125
|
-
},
|
|
126
|
-
"required": false,
|
|
127
|
-
"optional": false,
|
|
128
|
-
"docs": {
|
|
129
|
-
"tags": [],
|
|
130
|
-
"text": "The size of the radio"
|
|
131
|
-
},
|
|
132
|
-
"getter": false,
|
|
133
|
-
"setter": false,
|
|
134
|
-
"attribute": "size",
|
|
135
|
-
"reflect": false,
|
|
136
|
-
"defaultValue": "'base'"
|
|
137
|
-
},
|
|
138
109
|
"disabled": {
|
|
139
110
|
"type": "boolean",
|
|
140
111
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/radio/radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EAEL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,CAAC,GACD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,MAAM,KAAK,GAAG,GAAG,CAChB;IACC,qDAAqD;IACrD,gDAAgD;
|
|
1
|
+
{"version":3,"file":"radio.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/radio/radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EAEL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,CAAC,GACD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAA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,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,GACjC;oBACF,4DACC,KAAK,EAAE,MAAM,CAAC;4BACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;yBACvB,CAAC,GACD,CACG;gBACN,8DAAa,CACN,CACF,CACP,CAAC;IACH,CAAC;IAEO,SAAS,CAAC,EAAS;QAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,EAAE,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QAED,MAAM,OAAO,GAAI,EAAE,CAAC,MAA2B,CAAC,OAAO,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tHost,\n\tProp,\n\tState,\n\th,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { nonce } from '../../../utils/nonce';\n\nconst radio = cva(\n\t[\n\t\t'peer appearance-none m-0 outline-none flex-shrink-0',\n\t\t'rounded-full border border-inset border-solid ',\n\t\t'w-4 h-4',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-white border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportivce-lilac-100 hover:border-black-teal-100',\n\t\t\t\t\t'checked:cursor-auto',\n\t\t\t\t\t'checked:bg-supportive-lilac checked:border-black-teal/20',\n\t\t\t\t\t'checked:ring-2 checked:ring-supportive-lilac-100',\n\t\t\t\t\t'checked:hover:bg-supportive-lilac checked:hover:border-black-teal/20',\n\t\t\t\t],\n\t\t\t\ttrue: 'bg-white-600 border-black-teal-50 cursor-not-allowed ',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-white border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportive-lilac-100 hover:border-black-teal-100',\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst circle = cva(\n\t[\n\t\t'block',\n\t\t'rounded-full bg-transparent',\n\t\t'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',\n\t\t'w-2 h-2',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse:\n\t\t\t\t\t'peer-checked:bg-white peer-checked:ring-1 peer-checked:ring-black-teal/10',\n\t\t\t\ttrue: 'peer-checked:bg-black-teal-200',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-radio',\n\tstyleUrl: 'radio.component.css',\n})\nexport class Radio {\n\t/**\n\t * The value of the radio button\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * Wether the radio is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the radio is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The id of the radio button\n\t */\n\t@Prop({ reflect: true }) id: string;\n\n\t/**\n\t * The name of the radio button\n\t */\n\t@Prop({ reflect: true }) name: string;\n\n\t/**\n\t * Wether the radio is checked\n\t */\n\t@Prop({ reflect: true }) checked: boolean = false;\n\n\t/**\n\t * Event whenever the checked changes\n\t */\n\t@Event() checkedChange: EventEmitter<boolean>;\n\n\t@State() private _nonce = nonce(5);\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-radio'>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id ?? this._nonce}\n\t\t\t\t\tclass='flex items-center justify-start gap-2 text-black-teal'\n\t\t\t\t>\n\t\t\t\t\t<div class='relative flex flex-shrink-0 items-center'>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={radio({\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\ttype='radio'\n\t\t\t\t\t\t\tid={this.id ?? this._nonce}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonChange={ev => this._onChange(ev)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={circle({\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</label>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onChange(ev: Event) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst checked = (ev.target as HTMLInputElement).checked;\n\t\tthis.checked = checked;\n\t\tthis.checkedChange.emit(checked);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-\[1px\]{left:1px!important}.left-\[2px\]{left:2px!important}.top-1\/2{top:50%!important}.m-0{margin:0!important}.flex{display:flex!important}.h-3{height:.75rem!important}.h-4{height:1rem!important}.h
|
|
1
|
+
*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-\[1px\]{left:1px!important}.left-\[2px\]{left:2px!important}.top-1\/2{top:50%!important}.m-0{margin:0!important}.flex{display:flex!important}.h-3{height:.75rem!important}.h-4{height:1rem!important}.h-\[14px\]{height:14px!important}.w-3{width:.75rem!important}.w-8{width:2rem!important}.w-\[14px\]{width:14px!important}.flex-shrink-0{flex-shrink:0!important}.-translate-y-1\/2{--tw-translate-y:-50%!important}.-translate-y-1\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.appearance-none{appearance:none!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-center{justify-content:center!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-black-teal-50{--tw-border-opacity:1!important;border-color:rgb(230 234 233/var(--tw-border-opacity,1))!important}.bg-black-teal-100{--tw-bg-opacity:1!important;background-color:rgb(205 212 211/var(--tw-bg-opacity,1))!important}.bg-black-teal-50{--tw-bg-opacity:1!important;background-color:rgb(230 234 233/var(--tw-bg-opacity,1))!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white,.bg-white-600{--tw-bg-opacity:1!important}.bg-white-600{background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.shadow-1{--tw-shadow:0 1px 1px rgba(0,2,2,.08)!important;--tw-shadow-colored:0 1px 1px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-black-teal\/10{--tw-ring-color:rgba(3,42,36,.1)!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.after\:h-1:after{content:var(--tw-content)!important;height:.25rem!important}.after\:w-1:after{content:var(--tw-content)!important;width:.25rem!important}.after\:rounded-full:after{border-radius:9999px!important;content:var(--tw-content)!important}.after\:bg-supportive-lilac-800:after{--tw-bg-opacity:1!important;background-color:rgb(189 140 255/var(--tw-bg-opacity,1))!important;content:var(--tw-content)!important}.after\:transition-all:after{content:var(--tw-content)!important;transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.after\:content-\[\]:after{--tw-content: !important;content:var(--tw-content)!important}.checked\:border-black-teal\/20:checked{border-color:rgba(3,42,36,.2)!important}.checked\:bg-supportive-lilac:checked{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.checked\:ring-2:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.checked\:ring-supportive-lilac-100:checked{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.hover\:border-black-teal-100:hover{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.hover\:bg-supportive-lilac-100:hover{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.checked\:hover\:border-black-teal\/20:hover:checked{border-color:rgba(3,42,36,.2)!important}.checked\:hover\:bg-supportive-lilac-700:hover:checked{--tw-bg-opacity:1!important;background-color:rgb(200 159 255/var(--tw-bg-opacity,1))!important}.group:hover .group-hover\:w-\[18px\]{width:18px!important}.group:hover .group-hover\:after\:w-2:after{content:var(--tw-content)!important;width:.5rem!important}.peer:checked~.peer-checked\:left-full{left:100%!important}.peer:checked~.peer-checked\:-translate-x-\[calc\(100\%\+1px\)\]{--tw-translate-x:calc(-100% - 1px)!important}.peer:checked~.peer-checked\:-translate-x-\[calc\(100\%\+1px\)\],.peer:checked~.peer-checked\:-translate-x-\[calc\(100\%\+2px\)\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.peer:checked~.peer-checked\:-translate-x-\[calc\(100\%\+2px\)\]{--tw-translate-x:calc(-100% - 2px)!important}.peer:checked~.peer-checked\:bg-black-teal-200{--tw-bg-opacity:1!important;background-color:rgb(154 170 167/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\:after\:content-\[\'\'\]:after{--tw-content:""!important;content:var(--tw-content)!important}
|
|
@@ -4,12 +4,9 @@ import { nonce } from "../../../utils/nonce";
|
|
|
4
4
|
const checkbox = cva([
|
|
5
5
|
'peer appearance-none m-0 outline-none flex-shrink-0',
|
|
6
6
|
'border border-inset border-solid ',
|
|
7
|
+
'rounded-full w-8 h-4',
|
|
7
8
|
], {
|
|
8
9
|
variants: {
|
|
9
|
-
size: {
|
|
10
|
-
sm: 'rounded-full w-8 h-4',
|
|
11
|
-
base: 'rounded-full w-10 h-6',
|
|
12
|
-
},
|
|
13
10
|
disabled: {
|
|
14
11
|
false: [
|
|
15
12
|
'cursor-pointer shadow-1',
|
|
@@ -29,56 +26,26 @@ const circle = cva([
|
|
|
29
26
|
'absolute top-1/2 peer-checked:left-full transform -translate-y-1/2 pointer-events-none',
|
|
30
27
|
], {
|
|
31
28
|
variants: {
|
|
32
|
-
size: {
|
|
33
|
-
sm: null,
|
|
34
|
-
base: null,
|
|
35
|
-
},
|
|
36
29
|
disabled: {
|
|
37
30
|
false: [
|
|
38
31
|
'bg-white ring-1 ring-black-teal/10',
|
|
39
32
|
'left-[1px] peer-checked:-translate-x-[calc(100%+1px)]',
|
|
40
33
|
"after:content-[] peer-checked:after:content-[''] after:bg-supportive-lilac-800 after:rounded-full after:transition-all",
|
|
34
|
+
'w-[14px] h-[14px] group-hover:w-[18px]',
|
|
35
|
+
'after:w-1 after:h-1 group-hover:after:w-2',
|
|
41
36
|
],
|
|
42
37
|
true: [
|
|
43
38
|
'bg-black-teal-100 peer-checked:bg-black-teal-200',
|
|
44
39
|
'left-[2px] peer-checked:-translate-x-[calc(100%+2px)]',
|
|
40
|
+
'w-3 h-3',
|
|
45
41
|
],
|
|
46
42
|
},
|
|
47
43
|
},
|
|
48
|
-
compoundVariants: [
|
|
49
|
-
{
|
|
50
|
-
size: 'sm',
|
|
51
|
-
disabled: false,
|
|
52
|
-
class: [
|
|
53
|
-
'w-[14px] h-[14px] group-hover:w-[18px]',
|
|
54
|
-
'after:w-1 after:h-1 group-hover:after:w-2',
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
size: 'base',
|
|
59
|
-
disabled: false,
|
|
60
|
-
class: [
|
|
61
|
-
'w-[22px] h-[22px] group-hover:w-[26px]',
|
|
62
|
-
'after:w-2 after:h-2 group-hover:after:w-3',
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
size: 'sm',
|
|
67
|
-
disabled: true,
|
|
68
|
-
class: 'w-3 h-3',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
size: 'base',
|
|
72
|
-
disabled: true,
|
|
73
|
-
class: 'w-[20px] h-[20px]',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
44
|
});
|
|
77
45
|
export class Toggle {
|
|
78
46
|
constructor() {
|
|
79
47
|
this.checked = undefined;
|
|
80
48
|
this.indeterminate = undefined;
|
|
81
|
-
this.size = 'base';
|
|
82
49
|
this.disabled = false;
|
|
83
50
|
this.required = true;
|
|
84
51
|
this.id = undefined;
|
|
@@ -94,13 +61,11 @@ export class Toggle {
|
|
|
94
61
|
*/
|
|
95
62
|
indeterminateChange;
|
|
96
63
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
98
|
-
size: this.size,
|
|
64
|
+
return (h(Host, { key: 'af914441aaa48a4ae3b5b962cf85d47480ffad83', class: 'p-checkbox' }, h("label", { key: '83d44d8292c5f0d82b1f0a0561e8906ae057d74c', htmlFor: this.id ?? this._nonce, class: 'flex items-center justify-start gap-2 text-black-teal' }, h("div", { key: 'a40171d14d2c82e2f0c04c27c0eb092850589bd1', class: 'group relative flex flex-shrink-0 items-center' }, h("input", { key: 'b056cad8a4e5764bdbab0875a88bbf07c6ff3d09', class: checkbox({
|
|
99
65
|
disabled: this.disabled,
|
|
100
|
-
}), type: 'checkbox', id: this.id ?? this._nonce, name: this.name, required: this.required, checked: !!this.checked, indeterminate: this.indeterminate, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '
|
|
101
|
-
size: this.size,
|
|
66
|
+
}), type: 'checkbox', id: this.id ?? this._nonce, name: this.name, required: this.required, checked: !!this.checked, indeterminate: this.indeterminate, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '9c0fd9118fdec489c4eaa1a202e26d4199ee9be7', class: circle({
|
|
102
67
|
disabled: this.disabled,
|
|
103
|
-
}) })), h("slot", { key: '
|
|
68
|
+
}) })), h("slot", { key: 'd2cdec166bbf1e2f4b8ec6dc06342cb8051933d1' }))));
|
|
104
69
|
}
|
|
105
70
|
_onChange(ev) {
|
|
106
71
|
if (this.disabled) {
|
|
@@ -169,26 +134,6 @@ export class Toggle {
|
|
|
169
134
|
"attribute": "indeterminate",
|
|
170
135
|
"reflect": false
|
|
171
136
|
},
|
|
172
|
-
"size": {
|
|
173
|
-
"type": "string",
|
|
174
|
-
"mutable": false,
|
|
175
|
-
"complexType": {
|
|
176
|
-
"original": "'sm' | 'base'",
|
|
177
|
-
"resolved": "\"base\" | \"sm\"",
|
|
178
|
-
"references": {}
|
|
179
|
-
},
|
|
180
|
-
"required": false,
|
|
181
|
-
"optional": false,
|
|
182
|
-
"docs": {
|
|
183
|
-
"tags": [],
|
|
184
|
-
"text": "The size of the checkbox"
|
|
185
|
-
},
|
|
186
|
-
"getter": false,
|
|
187
|
-
"setter": false,
|
|
188
|
-
"attribute": "size",
|
|
189
|
-
"reflect": false,
|
|
190
|
-
"defaultValue": "'base'"
|
|
191
|
-
},
|
|
192
137
|
"disabled": {
|
|
193
138
|
"type": "boolean",
|
|
194
139
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/toggle/toggle.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EAEL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,CAAC,GACD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,MAAM,QAAQ,GAAG,GAAG,CACnB;IACC,qDAAqD;IACrD,mCAAmC;
|
|
1
|
+
{"version":3,"file":"toggle.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/toggle/toggle.component.tsx"],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tHost,\n\tProp,\n\tState,\n\th,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { nonce } from '../../../utils/nonce';\n\nconst checkbox = cva(\n\t[\n\t\t'peer appearance-none m-0 outline-none flex-shrink-0',\n\t\t'border border-inset border-solid ',\n\t\t'rounded-full w-8 h-4',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-black-teal-50 border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportive-lilac-100 hover:border-black-teal-100',\n\t\t\t\t\t'checked:bg-supportive-lilac checked:border-black-teal/20',\n\t\t\t\t\t'checked:ring-2 checked:ring-supportive-lilac-100',\n\t\t\t\t\t'checked:hover:bg-supportive-lilac-700 checked:hover:border-black-teal/20',\n\t\t\t\t],\n\t\t\t\ttrue: 'bg-white-600 border-black-teal-50 cursor-not-allowed ',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst circle = cva(\n\t[\n\t\t'flex items-center justify-center',\n\t\t'rounded-full transition-all ',\n\t\t'absolute top-1/2 peer-checked:left-full transform -translate-y-1/2 pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'bg-white ring-1 ring-black-teal/10',\n\t\t\t\t\t'left-[1px] peer-checked:-translate-x-[calc(100%+1px)]',\n\t\t\t\t\t\"after:content-[] peer-checked:after:content-[''] after:bg-supportive-lilac-800 after:rounded-full after:transition-all\",\n\t\t\t\t\t'w-[14px] h-[14px] group-hover:w-[18px]',\n\t\t\t\t\t'after:w-1 after:h-1 group-hover:after:w-2',\n\t\t\t\t],\n\t\t\t\ttrue: [\n\t\t\t\t\t'bg-black-teal-100 peer-checked:bg-black-teal-200',\n\t\t\t\t\t'left-[2px] peer-checked:-translate-x-[calc(100%+2px)]',\n\t\t\t\t\t'w-3 h-3',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-toggle',\n\tstyleUrl: 'toggle.component.css',\n})\nexport class Toggle {\n\t/**\n\t * Wether the checkbox is checked\n\t */\n\t@Prop() checked: boolean;\n\n\t/**\n\t * Wether the checkbox is in indeterminate state\n\t */\n\t@Prop() indeterminate: boolean;\n\n\t/**\n\t * Wether the checkbox is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the checkbox is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The id of the checkbox button\n\t */\n\t@Prop({ reflect: true }) id: string;\n\n\t/**\n\t * The name of the checkbox button\n\t */\n\t@Prop({ reflect: true }) name: string;\n\n\t/**\n\t * Event whenever the checked changes\n\t */\n\t@Event() checkedChange: EventEmitter<boolean>;\n\t/**\n\t * Event whenever the indeterminate changes\n\t */\n\t@Event() indeterminateChange: EventEmitter<boolean>;\n\n\t@State() private _nonce = nonce(5);\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-checkbox'>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id ?? this._nonce}\n\t\t\t\t\tclass='flex items-center justify-start gap-2 text-black-teal'\n\t\t\t\t>\n\t\t\t\t\t<div class='group relative flex flex-shrink-0 items-center'>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={checkbox({\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\ttype='checkbox'\n\t\t\t\t\t\t\tid={this.id ?? this._nonce}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tchecked={!!this.checked}\n\t\t\t\t\t\t\tindeterminate={this.indeterminate}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonChange={ev => this._onChange(ev)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={circle({\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</label>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onChange(ev: Event) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst checked = (ev.target as HTMLInputElement).checked;\n\t\tconst indeterminate = (ev.target as HTMLInputElement).indeterminate;\n\n\t\tif (checked != this.checked) {\n\t\t\tthis.checked = checked;\n\t\t\tthis.checkedChange.emit(checked);\n\t\t}\n\n\t\tif (indeterminate != this.indeterminate) {\n\t\t\tthis.indeterminate = indeterminate;\n\t\t\tthis.indeterminateChange.emit(indeterminate);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -3,18 +3,15 @@ import { c as cva } from './index2.js';
|
|
|
3
3
|
import { n as nonce } from './nonce.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './icon.component.js';
|
|
5
5
|
|
|
6
|
-
const checkboxComponentCss = "*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-1\\/2{top:50%!important}.m-0{margin:0!important}.flex{display:flex!important}.hidden{display:none!important}.h-4{height:1rem!important}.
|
|
6
|
+
const checkboxComponentCss = "*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-1\\/2{top:50%!important}.m-0{margin:0!important}.flex{display:flex!important}.hidden{display:none!important}.h-4{height:1rem!important}.w-4{width:1rem!important}.flex-shrink-0{flex-shrink:0!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-y-1\\/2{--tw-translate-y:-50%!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.appearance-none{appearance:none!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-black-teal-50{--tw-border-opacity:1!important;border-color:rgb(230 234 233/var(--tw-border-opacity,1))!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white,.bg-white-600{--tw-bg-opacity:1!important}.bg-white-600{background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.shadow-1{--tw-shadow:0 1px 1px rgba(0,2,2,.08)!important;--tw-shadow-colored:0 1px 1px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.drop-shadow-black-teal-10\\%{--tw-drop-shadow:drop-shadow(0px 1px 0px rgba(3,42,36,.1))!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.checked\\:border-black-teal\\/20:checked{border-color:rgba(3,42,36,.2)!important}.checked\\:bg-supportive-lilac:checked{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.checked\\:ring-2:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.checked\\:ring-supportive-lilac-100:checked{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.indeterminate\\:border-black-teal\\/20:indeterminate{border-color:rgba(3,42,36,.2)!important}.indeterminate\\:bg-supportive-lilac-700:indeterminate{--tw-bg-opacity:1!important;background-color:rgb(200 159 255/var(--tw-bg-opacity,1))!important}.indeterminate\\:ring-2:indeterminate{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.indeterminate\\:ring-supportive-lilac-100:indeterminate{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.hover\\:border-black-teal-100:hover{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.hover\\:bg-supportive-lilac-100:hover{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.checked\\:hover\\:border-black-teal\\/20:hover:checked{border-color:rgba(3,42,36,.2)!important}.checked\\:hover\\:bg-supportive-lilac-700:hover:checked{--tw-bg-opacity:1!important;background-color:rgb(200 159 255/var(--tw-bg-opacity,1))!important}.indeterminate\\:hover\\:border-black-teal\\/20:hover:indeterminate{border-color:rgba(3,42,36,.2)!important}.indeterminate\\:hover\\:bg-supportive-lilac:hover:indeterminate{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.group\\/p-checkbox:hover .group-hover\\/p-checkbox\\:text-sm{font-size:.875rem!important;line-height:1.25rem!important}.peer:checked~.peer-checked\\:flex{display:flex!important}.peer:indeterminate~.peer-indeterminate\\:flex{display:flex!important}";
|
|
7
7
|
const PCheckboxStyle0 = checkboxComponentCss;
|
|
8
8
|
|
|
9
9
|
const checkbox = cva([
|
|
10
10
|
'peer appearance-none m-0 outline-none flex-shrink-0',
|
|
11
11
|
'border border-inset border-solid ',
|
|
12
|
+
'rounded w-4 h-4',
|
|
12
13
|
], {
|
|
13
14
|
variants: {
|
|
14
|
-
size: {
|
|
15
|
-
sm: 'rounded w-4 h-4',
|
|
16
|
-
base: 'rounded-lg w-6 h-6',
|
|
17
|
-
},
|
|
18
15
|
disabled: {
|
|
19
16
|
false: [
|
|
20
17
|
'cursor-pointer shadow-1',
|
|
@@ -31,7 +28,7 @@ const checkbox = cva([
|
|
|
31
28
|
},
|
|
32
29
|
},
|
|
33
30
|
});
|
|
34
|
-
const
|
|
31
|
+
const iconContainer = cva([
|
|
35
32
|
'hidden peer-indeterminate:flex peer-checked:flex',
|
|
36
33
|
'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',
|
|
37
34
|
], {
|
|
@@ -42,6 +39,14 @@ const icon = cva([
|
|
|
42
39
|
},
|
|
43
40
|
},
|
|
44
41
|
});
|
|
42
|
+
const icon = cva(['drop-shadow-black-teal-10% text-xs'], {
|
|
43
|
+
variants: {
|
|
44
|
+
disabled: {
|
|
45
|
+
false: 'group-hover/p-checkbox:text-sm',
|
|
46
|
+
true: null,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
45
50
|
const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLElement {
|
|
46
51
|
constructor() {
|
|
47
52
|
super();
|
|
@@ -50,7 +55,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
50
55
|
this.indeterminateChange = createEvent(this, "indeterminateChange", 7);
|
|
51
56
|
this.checked = undefined;
|
|
52
57
|
this.indeterminate = undefined;
|
|
53
|
-
this.size = 'base';
|
|
54
58
|
this.disabled = false;
|
|
55
59
|
this.required = true;
|
|
56
60
|
this.id = undefined;
|
|
@@ -66,12 +70,13 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
66
70
|
*/
|
|
67
71
|
indeterminateChange;
|
|
68
72
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
70
|
-
|
|
73
|
+
return (h(Host, { key: '3fc7254132b37579295b56aa49cd9d5313ca1b17', class: 'p-checkbox' }, h("label", { key: 'bcb109993fb2219ed2575773976f5c312dd70999', htmlFor: this.id ?? this._nonce, class: 'group/p-checkbox flex items-center justify-start gap-2 text-black-teal' }, h("div", { key: '8a248d351a959bcc8095024d739c20243a69e797', class: 'relative flex flex-shrink-0 items-center' }, h("input", { key: 'a297cea3c229c9d5241884732f6281cc4ae471a2', class: checkbox({
|
|
74
|
+
disabled: this.disabled,
|
|
75
|
+
}), type: 'checkbox', id: this.id ?? this._nonce, name: this.name, required: this.required, checked: !!this.checked, indeterminate: this.indeterminate, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '59733c1ee445272627bb3f11bf8f9a59798755fa', class: iconContainer({
|
|
71
76
|
disabled: this.disabled,
|
|
72
|
-
})
|
|
77
|
+
}) }, h("p-icon", { key: 'd31d40111ef2073daca07fdc4ec994a31350cc40', class: icon({
|
|
73
78
|
disabled: this.disabled,
|
|
74
|
-
})
|
|
79
|
+
}), size: 'auto', variant: !!this.indeterminate ? 'minus' : 'checkmarkThick' }))), h("slot", { key: 'd5bc07c185226d73f5823afdd437b4b1f208240d' }))));
|
|
75
80
|
}
|
|
76
81
|
_onChange(ev) {
|
|
77
82
|
if (this.disabled) {
|
|
@@ -93,7 +98,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
93
98
|
}, [4, "p-checkbox", {
|
|
94
99
|
"checked": [4],
|
|
95
100
|
"indeterminate": [4],
|
|
96
|
-
"size": [1],
|
|
97
101
|
"disabled": [516],
|
|
98
102
|
"required": [516],
|
|
99
103
|
"id": [513],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"checkbox.component.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,
|
|
1
|
+
{"file":"checkbox.component.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,8qKAA8qK,CAAC;AAC5sK,wBAAe,oBAAoB;;ACWnC,MAAM,QAAQ,GAAG,GAAG,CACnB;IACC,qDAAqD;IACrD,mCAAmC;IACnC,iBAAiB;CACjB,EACD;IACC,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,KAAK,EAAE;gBACN,yBAAyB;gBACzB,gCAAgC;gBAChC,2DAA2D;gBAC3D,0DAA0D;gBAC1D,kDAAkD;gBAClD,0EAA0E;gBAC1E,0EAA0E;gBAC1E,8DAA8D;gBAC9D,kFAAkF;aAClF;YACD,IAAI,EAAE,uDAAuD;SAC7D;KACD;CACD,CACD,CAAC;AAEF,MAAM,aAAa,GAAG,GAAG,CACxB;IACC,kDAAkD;IAClD,2FAA2F;CAC3F,EACD;IACC,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,KAAK,EAAE,YAAY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,aAAa,GAAG,OAAO,GAAG,gBAAgB,GACzD,CACG,CACD,EACN,8DAAa,CACN,CACF,EACN;KACF;IAEO,SAAS,CAAC,EAAS;QAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClB,EAAE,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;SACP;QAED,MAAM,OAAO,GAAI,EAAE,CAAC,MAA2B,CAAC,OAAO,CAAC;QACxD,MAAM,aAAa,GAAI,EAAE,CAAC,MAA2B,CAAC,aAAa,CAAC;QAEpE,IAAI,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE;YAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACjC;QAED,IAAI,aAAa,IAAI,IAAI,CAAC,aAAa,EAAE;YACxC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;YACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAC7C;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/atoms/checkbox/checkbox.component.css?tag=p-checkbox","src/components/atoms/checkbox/checkbox.component.tsx"],"sourcesContent":["","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tHost,\n\tProp,\n\tState,\n\th,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { nonce } from '../../../utils/nonce';\n\nconst checkbox = cva(\n\t[\n\t\t'peer appearance-none m-0 outline-none flex-shrink-0',\n\t\t'border border-inset border-solid ',\n\t\t'rounded w-4 h-4',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-white border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportive-lilac-100 hover:border-black-teal-100',\n\t\t\t\t\t'checked:bg-supportive-lilac checked:border-black-teal/20',\n\t\t\t\t\t'checked:ring-2 checked:ring-supportive-lilac-100',\n\t\t\t\t\t'checked:hover:bg-supportive-lilac-700 checked:hover:border-black-teal/20',\n\t\t\t\t\t'indeterminate:bg-supportive-lilac-700 indeterminate:border-black-teal/20',\n\t\t\t\t\t'indeterminate:ring-2 indeterminate:ring-supportive-lilac-100',\n\t\t\t\t\t'indeterminate:hover:bg-supportive-lilac indeterminate:hover:border-black-teal/20',\n\t\t\t\t],\n\t\t\t\ttrue: 'bg-white-600 border-black-teal-50 cursor-not-allowed ',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst iconContainer = cva(\n\t[\n\t\t'hidden peer-indeterminate:flex peer-checked:flex',\n\t\t'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'text-white',\n\t\t\t\ttrue: 'text-black-teal-200',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst icon = cva(['drop-shadow-black-teal-10% text-xs'], {\n\tvariants: {\n\t\tdisabled: {\n\t\t\tfalse: 'group-hover/p-checkbox:text-sm',\n\t\t\ttrue: null,\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-checkbox',\n\tstyleUrl: 'checkbox.component.css',\n})\nexport class Checkbox {\n\t/**\n\t * Wether the checkbox is checked\n\t */\n\t@Prop() checked: boolean;\n\n\t/**\n\t * Wether the checkbox is in indeterminate state\n\t */\n\t@Prop() indeterminate: boolean;\n\n\t/**\n\t * Wether the checkbox is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the checkbox is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The id of the checkbox button\n\t */\n\t@Prop({ reflect: true }) id: string;\n\n\t/**\n\t * The name of the checkbox button\n\t */\n\t@Prop({ reflect: true }) name: string;\n\n\t/**\n\t * Event whenever the checked changes\n\t */\n\t@Event() checkedChange: EventEmitter<boolean>;\n\t/**\n\t * Event whenever the indeterminate changes\n\t */\n\t@Event() indeterminateChange: EventEmitter<boolean>;\n\n\t@State() private _nonce = nonce(5);\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-checkbox'>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id ?? this._nonce}\n\t\t\t\t\tclass='group/p-checkbox flex items-center justify-start gap-2 text-black-teal'\n\t\t\t\t>\n\t\t\t\t\t<div class='relative flex flex-shrink-0 items-center'>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={checkbox({\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\ttype='checkbox'\n\t\t\t\t\t\t\tid={this.id ?? this._nonce}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tchecked={!!this.checked}\n\t\t\t\t\t\t\tindeterminate={this.indeterminate}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonChange={ev => this._onChange(ev)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={iconContainer({\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tclass={icon({\n\t\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tsize='auto'\n\t\t\t\t\t\t\t\tvariant={!!this.indeterminate ? 'minus' : 'checkmarkThick'}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</label>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onChange(ev: Event) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst checked = (ev.target as HTMLInputElement).checked;\n\t\tconst indeterminate = (ev.target as HTMLInputElement).indeterminate;\n\n\t\tif (checked != this.checked) {\n\t\t\tthis.checked = checked;\n\t\t\tthis.checkedChange.emit(checked);\n\t\t}\n\n\t\tif (indeterminate != this.indeterminate) {\n\t\t\tthis.indeterminate = indeterminate;\n\t\t\tthis.indeterminateChange.emit(indeterminate);\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -172,7 +172,7 @@ const DropdownMenuItem = /*@__PURE__*/ proxyCustomElement(class DropdownMenuItem
|
|
|
172
172
|
variant: this.variant,
|
|
173
173
|
active: this.active,
|
|
174
174
|
disabled: this.disabled,
|
|
175
|
-
}), variant: this.icon })), this.checkbox && (h("p-checkbox", { key: '
|
|
175
|
+
}), variant: this.icon })), this.checkbox && (h("p-checkbox", { key: '83b9eb1dedd3f7bcaf9e064167832b1b9ec7dbd3', checked: this.active, disabled: this.disabled })), this.useContainer ? (h("div", { class: 'block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start' }, h("slot", null))) : (h("slot", null))));
|
|
176
176
|
}
|
|
177
177
|
static get style() { return PDropdownMenuItemStyle0; }
|
|
178
178
|
}, [4, "p-dropdown-menu-item", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropdown-menu-item.component.js","mappings":";;;;;AAAA,MAAM,4BAA4B,GAAG,4jGAA4jG,CAAC;AAClmG,gCAAe,4BAA4B;;ACG3C,MAAM,gBAAgB,GAAG,GAAG,CAC3B;IACC,4GAA4G;CAC5G,EACD;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,IAAI;SACd;QACD,MAAM,EAAE;YACP,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;SACV;QACD,QAAQ,EAAE;YACT,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,oBAAoB;SAC1B;QACD,WAAW,EAAE;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C,OAAO,EAAE,IAAI,CAAC,MAAM,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACtB,CACF,EAEA,IAAI,CAAC,YAAY,IACjB,WAAK,KAAK,EAAC,yEAAyE,IACnF,eAAQ,CACH,KAEN,eAAQ,CACR,CACK,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css?tag=p-dropdown-menu-item","src/components/atoms/dropdown-menu-item/dropdown-menu-item.component.tsx"],"sourcesContent":["","import { Component, Host, Prop, h } from '@stencil/core';\nimport { IconVariant } from '../icon/icon.component';\nimport { cva } from 'class-variance-authority';\n\nconst dropdownMenuItem = cva(\n\t[\n\t\t'p-dropdown-menu-item flex px-2 py-1 gap-2 text-sm font-medium group rounded-lg items-center h-8 max-w-full',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: null,\n\t\t\t\t'dark-teal': null,\n\t\t\t\tnegative: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'cursor-pointer',\n\t\t\t\ttrue: 'cursor-not-allowed',\n\t\t\t},\n\t\t\tenableHover: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-black-teal hover:bg-supportive-lilac-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-supportive-lilac-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-black-teal-200',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: true,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-supportive-lilac-100',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tclass: 'text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'hover:bg-dark-teal-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'text-white bg-dark-teal-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'opacity-40',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-negative-red hover:bg-negative-red-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tactive: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-negative-red-100 text-negative-red',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-negative-red-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tdisabled: true,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-negative-red-50',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'cursor-pointer',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst dropdownMenuItemIcon = cva(['text-base'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: null,\n\t\t\t'dark-teal': null,\n\t\t\tnegative: null,\n\t\t},\n\t\tactive: {\n\t\t\tfalse: null,\n\t\t\ttrue: null,\n\t\t},\n\t\tdisabled: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'text-black-teal-100',\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'default',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-black-teal-300 group-hover:text-black-teal',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'dark-teal',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-dark-teal-100 group-hover:text-white',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'negative',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-negative-red group-hover:text-negative-red-800',\n\t\t},\n\t\t{\n\t\t\tvariant: 'negative',\n\t\t\tactive: true,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-negative-red-800',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-dropdown-menu-item',\n\tstyleUrl: 'dropdown-menu-item.component.css',\n})\nexport class DropdownMenuItem {\n\t/**\n\t * Wether the dropdown menu item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Wether the dropdown menu item has a checkbox\n\t */\n\t@Prop() checkbox: boolean = false;\n\n\t/**\n\t * The variant of the item\n\t */\n\t@Prop() variant: 'default' | 'dark-teal' | 'negative' = 'default';\n\n\t/**\n\t * Wether to enable the hover state\n\t */\n\t@Prop() enableHover: boolean = true;\n\n\t/**\n\t * Wether the item is disabled\n\t */\n\t@Prop() disabled: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * wether to use the container for text\n\t */\n\t@Prop() useContainer = true;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={dropdownMenuItem({\n\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\tactive: this.active,\n\t\t\t\t\tenableHover: this.enableHover,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{/* class={`p-dropdown-menu-item ${this.active && 'active'} ${ */}\n\t\t\t\t{/* \tthis.enableHover && 'hover' */}\n\t\t\t\t{/* }`} */}\n\t\t\t\t{this.icon && (\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tclass={dropdownMenuItemIcon({\n\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\tactive: this.active,\n\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{this.checkbox && (\n\t\t\t\t\t<p-checkbox\n\t\t\t\t\t\tchecked={this.active}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{this.useContainer ? (\n\t\t\t\t\t<div class='block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<slot />\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -2,18 +2,15 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { c as cva } from './index2.js';
|
|
3
3
|
import { n as nonce } from './nonce.js';
|
|
4
4
|
|
|
5
|
-
const radioComponentCss = "*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-1\\/2{top:50%!important}.m-0{margin:0!important}.block{display:block!important}.flex{display:flex!important}.h-2{height:.5rem!important}.h-
|
|
5
|
+
const radioComponentCss = "*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-1\\/2{top:50%!important}.m-0{margin:0!important}.block{display:block!important}.flex{display:flex!important}.h-2{height:.5rem!important}.h-4{height:1rem!important}.w-2{width:.5rem!important}.w-4{width:1rem!important}.flex-shrink-0{flex-shrink:0!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-y-1\\/2{--tw-translate-y:-50%!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.appearance-none{appearance:none!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-black-teal-50{--tw-border-opacity:1!important;border-color:rgb(230 234 233/var(--tw-border-opacity,1))!important}.bg-transparent{background-color:transparent!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white,.bg-white-600{--tw-bg-opacity:1!important}.bg-white-600{background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.shadow-1{--tw-shadow:0 1px 1px rgba(0,2,2,.08)!important;--tw-shadow-colored:0 1px 1px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.checked\\:cursor-auto:checked{cursor:auto!important}.checked\\:border-black-teal\\/20:checked{border-color:rgba(3,42,36,.2)!important}.checked\\:bg-supportive-lilac:checked{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.checked\\:ring-2:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.checked\\:ring-supportive-lilac-100:checked{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.hover\\:border-black-teal-100:hover{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.hover\\:bg-supportive-lilac-100:hover{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.checked\\:hover\\:border-black-teal\\/20:hover:checked{border-color:rgba(3,42,36,.2)!important}.checked\\:hover\\:bg-supportive-lilac:hover:checked{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\\:bg-black-teal-200{--tw-bg-opacity:1!important;background-color:rgb(154 170 167/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\\:bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\\:ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.peer:checked~.peer-checked\\:ring-black-teal\\/10{--tw-ring-color:rgba(3,42,36,.1)!important}";
|
|
6
6
|
const PRadioStyle0 = radioComponentCss;
|
|
7
7
|
|
|
8
8
|
const radio = cva([
|
|
9
9
|
'peer appearance-none m-0 outline-none flex-shrink-0',
|
|
10
10
|
'rounded-full border border-inset border-solid ',
|
|
11
|
+
'w-4 h-4',
|
|
11
12
|
], {
|
|
12
13
|
variants: {
|
|
13
|
-
size: {
|
|
14
|
-
sm: 'w-4 h-4',
|
|
15
|
-
base: 'w-6 h-6',
|
|
16
|
-
},
|
|
17
14
|
disabled: {
|
|
18
15
|
false: [
|
|
19
16
|
'cursor-pointer shadow-1',
|
|
@@ -42,12 +39,9 @@ const circle = cva([
|
|
|
42
39
|
'block',
|
|
43
40
|
'rounded-full bg-transparent',
|
|
44
41
|
'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',
|
|
42
|
+
'w-2 h-2',
|
|
45
43
|
], {
|
|
46
44
|
variants: {
|
|
47
|
-
size: {
|
|
48
|
-
sm: 'w-2 h-2',
|
|
49
|
-
base: 'w-3 h-3',
|
|
50
|
-
},
|
|
51
45
|
disabled: {
|
|
52
46
|
false: 'peer-checked:bg-white peer-checked:ring-1 peer-checked:ring-black-teal/10',
|
|
53
47
|
true: 'peer-checked:bg-black-teal-200',
|
|
@@ -60,7 +54,6 @@ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
|
|
|
60
54
|
this.__registerHost();
|
|
61
55
|
this.checkedChange = createEvent(this, "checkedChange", 7);
|
|
62
56
|
this.value = undefined;
|
|
63
|
-
this.size = 'base';
|
|
64
57
|
this.disabled = false;
|
|
65
58
|
this.required = true;
|
|
66
59
|
this.id = undefined;
|
|
@@ -73,13 +66,11 @@ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
|
|
|
73
66
|
*/
|
|
74
67
|
checkedChange;
|
|
75
68
|
render() {
|
|
76
|
-
return (h(Host, { key: '
|
|
77
|
-
size: this.size,
|
|
69
|
+
return (h(Host, { key: '658055a3fe8964f1b9aacac6328589378ecb5e65', class: 'p-radio' }, h("label", { key: 'd26499f5c5f959670fa60039c462d30376258742', htmlFor: this.id ?? this._nonce, class: 'flex items-center justify-start gap-2 text-black-teal' }, h("div", { key: 'd8e90dc7b26edf3d0d4c5c9c3d4d2f204723fef8', class: 'relative flex flex-shrink-0 items-center' }, h("input", { key: '893f998e9a7a7a91c830c1f2cdcca3b7ed2a7a7e', class: radio({
|
|
78
70
|
disabled: this.disabled,
|
|
79
|
-
}), type: 'radio', id: this.id ?? this._nonce, name: this.name, required: this.required, value: this.value, checked: this.checked, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '
|
|
80
|
-
size: this.size,
|
|
71
|
+
}), type: 'radio', id: this.id ?? this._nonce, name: this.name, required: this.required, value: this.value, checked: this.checked, disabled: this.disabled, onChange: ev => this._onChange(ev) }), h("div", { key: '22413291018ffbc803f31c6211bb99531581cc4f', class: circle({
|
|
81
72
|
disabled: this.disabled,
|
|
82
|
-
}) })), h("slot", { key: '
|
|
73
|
+
}) })), h("slot", { key: 'b30677ea30eff5805a87b108029a2cb21405c502' }))));
|
|
83
74
|
}
|
|
84
75
|
_onChange(ev) {
|
|
85
76
|
if (this.disabled) {
|
|
@@ -93,7 +84,6 @@ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
|
|
|
93
84
|
static get style() { return PRadioStyle0; }
|
|
94
85
|
}, [4, "p-radio", {
|
|
95
86
|
"value": [1],
|
|
96
|
-
"size": [1],
|
|
97
87
|
"disabled": [516],
|
|
98
88
|
"required": [516],
|
|
99
89
|
"id": [513],
|