primevue 4.2.3 → 4.2.4

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.
@@ -10,7 +10,7 @@
10
10
  import type { DefineComponent, DesignToken, EmitFn, Nullable, PassThrough } from '@primevue/core';
11
11
  import type { ComponentHooks } from '@primevue/core/basecomponent';
12
12
  import type { PassThroughOptions } from 'primevue/passthrough';
13
- import 'vue';
13
+ import { InputHTMLAttributes } from 'vue';
14
14
 
15
15
  export declare type InputTextPassThroughOptionType<T = any> = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions<T>) => InputTextPassThroughAttributes | string) | string | null | undefined;
16
16
 
@@ -82,7 +82,7 @@ export interface InputTextContext {
82
82
  /**
83
83
  * Defines valid properties in InputText component.
84
84
  */
85
- export interface InputTextProps {
85
+ export interface InputTextProps extends Omit<InputHTMLAttributes, 'size'> {
86
86
  /**
87
87
  * Value of the component.
88
88
  */
package/knob/index.d.ts CHANGED
@@ -191,7 +191,7 @@ export interface KnobProps {
191
191
  * Template string of the value.
192
192
  * @defaultValue '{value}'
193
193
  */
194
- valueTemplate?: (val: number) => string | string | undefined;
194
+ valueTemplate?: ((val: number) => string) | string | undefined;
195
195
  /**
196
196
  * Index of the element in tabbing order.
197
197
  * @defaultValue 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primevue",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
4
4
  "author": "PrimeTek Informatics",
5
5
  "description": "PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 370+ ready to use UI blocks to build spectacular applications in no time.",
6
6
  "homepage": "https://primevue.org/",
@@ -59,8 +59,8 @@
59
59
  "dependencies": {
60
60
  "@primeuix/styled": "^0.3.2",
61
61
  "@primeuix/utils": "^0.3.2",
62
- "@primevue/core": "4.2.3",
63
- "@primevue/icons": "4.2.3"
62
+ "@primevue/core": "4.2.4",
63
+ "@primevue/icons": "4.2.4"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">=12.11.0"
@@ -169,7 +169,7 @@ export interface PasswordMeterStateOptions {
169
169
  /**
170
170
  * Defines valid properties in Password component.
171
171
  */
172
- export interface PasswordProps {
172
+ export interface PasswordProps extends Omit<InputHTMLAttributes, 'size'> {
173
173
  /**
174
174
  * Value of the component.
175
175
  */
@@ -10,7 +10,7 @@
10
10
  import type { DefineComponent, DesignToken, EmitFn, Nullable, PassThrough } from '@primevue/core';
11
11
  import type { ComponentHooks } from '@primevue/core/basecomponent';
12
12
  import type { PassThroughOptions } from 'primevue/passthrough';
13
- import 'vue';
13
+ import { InputHTMLAttributes } from 'vue';
14
14
 
15
15
  export declare type TextareaPassThroughOptionType = TextareaPassThroughAttributes | ((options: TextareaPassThroughMethodOptions) => TextareaPassThroughAttributes | string) | string | null | undefined;
16
16
 
@@ -86,7 +86,7 @@ export interface TextareaContext {
86
86
  /**
87
87
  * Defines valid properties in Textarea component. In addition to these, all properties of TextareaHTMLAttributes can be used in this component.
88
88
  */
89
- export interface TextareaProps {
89
+ export interface TextareaProps extends Omit<InputHTMLAttributes, 'size'> {
90
90
  /**
91
91
  * Value of the component.
92
92
  */
@@ -2,7 +2,7 @@ import BaseStyle from '@primevue/core/base/style';
2
2
 
3
3
  var theme = function theme(_ref) {
4
4
  var dt = _ref.dt;
5
- return "\n.p-toggleswitch {\n display: inline-block;\n width: ".concat(dt('toggleswitch.width'), ";\n height: ").concat(dt('toggleswitch.height'), ";\n}\n\n.p-toggleswitch-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border-radius: ").concat(dt('toggleswitch.border.radius'), ";\n}\n\n.p-toggleswitch-slider {\n display: inline-block;\n cursor: pointer;\n width: 100%;\n height: 100%;\n border-width: ").concat(dt('toggleswitch.border.width'), ";\n border-style: solid;\n border-color: ").concat(dt('toggleswitch.border.color'), ";\n background: ").concat(dt('toggleswitch.background'), ";\n transition: background ").concat(dt('toggleswitch.transition.duration'), ", color ").concat(dt('toggleswitch.transition.duration'), ", border-color ").concat(dt('toggleswitch.transition.duration'), ", outline-color ").concat(dt('toggleswitch.transition.duration'), ", box-shadow ").concat(dt('toggleswitch.transition.duration'), ";\n border-radius: ").concat(dt('toggleswitch.border.radius'), ";\n outline-color: transparent;\n box-shadow: ").concat(dt('toggleswitch.shadow'), ";\n}\n\n.p-toggleswitch-handle {\n position: absolute;\n top: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: ").concat(dt('toggleswitch.handle.background'), ";\n color: ").concat(dt('toggleswitch.handle.color'), ";\n width: ").concat(dt('toggleswitch.handle.size'), ";\n height: ").concat(dt('toggleswitch.handle.size'), ";\n inset-inline-start: ").concat(dt('toggleswitch.gap'), ";\n margin-block-start: calc(-1 * calc(").concat(dt('toggleswitch.handle.size'), " / 2));\n border-radius: ").concat(dt('toggleswitch.handle.border.radius'), ";\n transition: background ").concat(dt('toggleswitch.transition.duration'), ", color ").concat(dt('toggleswitch.transition.duration'), ", inset-inline-start ").concat(dt('toggleswitch.slide.duration'), ", box-shadow ").concat(dt('toggleswitch.slide.duration'), ";\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.checked.background'), ";\n border-color: ").concat(dt('toggleswitch.checked.border.color'), ";\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.checked.background'), ";\n color: ").concat(dt('toggleswitch.handle.checked.color'), ";\n inset-inline-start: calc(").concat(dt('toggleswitch.width'), " - calc(").concat(dt('toggleswitch.handle.size'), " + ").concat(dt('toggleswitch.gap'), "));\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.hover.background'), ";\n border-color: ").concat(dt('toggleswitch.hover.border.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.hover.background'), ";\n color: ").concat(dt('toggleswitch.handle.hover.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.checked.hover.background'), ";\n border-color: ").concat(dt('toggleswitch.checked.hover.border.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.checked.hover.background'), ";\n color: ").concat(dt('toggleswitch.handle.checked.hover.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {\n box-shadow: ").concat(dt('toggleswitch.focus.ring.shadow'), ";\n outline: ").concat(dt('toggleswitch.focus.ring.width'), " ").concat(dt('toggleswitch.focus.ring.style'), " ").concat(dt('toggleswitch.focus.ring.color'), ";\n outline-offset: ").concat(dt('toggleswitch.focus.ring.offset'), ";\n}\n\n.p-toggleswitch.p-invalid > .p-toggleswitch-slider {\n border-color: ").concat(dt('toggleswitch.invalid.border.color'), ";\n}\n\n.p-toggleswitch.p-disabled {\n opacity: 1;\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.disabled.background'), ";\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.disabled.background'), ";\n}\n");
5
+ return "\n.p-toggleswitch {\n display: inline-block;\n width: ".concat(dt('toggleswitch.width'), ";\n height: ").concat(dt('toggleswitch.height'), ";\n}\n\n.p-toggleswitch-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border-radius: ").concat(dt('toggleswitch.border.radius'), ";\n}\n\n.p-toggleswitch-slider {\n cursor: pointer;\n width: 100%;\n height: 100%;\n border-width: ").concat(dt('toggleswitch.border.width'), ";\n border-style: solid;\n border-color: ").concat(dt('toggleswitch.border.color'), ";\n background: ").concat(dt('toggleswitch.background'), ";\n transition: background ").concat(dt('toggleswitch.transition.duration'), ", color ").concat(dt('toggleswitch.transition.duration'), ", border-color ").concat(dt('toggleswitch.transition.duration'), ", outline-color ").concat(dt('toggleswitch.transition.duration'), ", box-shadow ").concat(dt('toggleswitch.transition.duration'), ";\n border-radius: ").concat(dt('toggleswitch.border.radius'), ";\n outline-color: transparent;\n box-shadow: ").concat(dt('toggleswitch.shadow'), ";\n}\n\n.p-toggleswitch-handle {\n position: absolute;\n top: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: ").concat(dt('toggleswitch.handle.background'), ";\n color: ").concat(dt('toggleswitch.handle.color'), ";\n width: ").concat(dt('toggleswitch.handle.size'), ";\n height: ").concat(dt('toggleswitch.handle.size'), ";\n inset-inline-start: ").concat(dt('toggleswitch.gap'), ";\n margin-block-start: calc(-1 * calc(").concat(dt('toggleswitch.handle.size'), " / 2));\n border-radius: ").concat(dt('toggleswitch.handle.border.radius'), ";\n transition: background ").concat(dt('toggleswitch.transition.duration'), ", color ").concat(dt('toggleswitch.transition.duration'), ", inset-inline-start ").concat(dt('toggleswitch.slide.duration'), ", box-shadow ").concat(dt('toggleswitch.slide.duration'), ";\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.checked.background'), ";\n border-color: ").concat(dt('toggleswitch.checked.border.color'), ";\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.checked.background'), ";\n color: ").concat(dt('toggleswitch.handle.checked.color'), ";\n inset-inline-start: calc(").concat(dt('toggleswitch.width'), " - calc(").concat(dt('toggleswitch.handle.size'), " + ").concat(dt('toggleswitch.gap'), "));\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.hover.background'), ";\n border-color: ").concat(dt('toggleswitch.hover.border.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.hover.background'), ";\n color: ").concat(dt('toggleswitch.handle.hover.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.checked.hover.background'), ";\n border-color: ").concat(dt('toggleswitch.checked.hover.border.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.checked.hover.background'), ";\n color: ").concat(dt('toggleswitch.handle.checked.hover.color'), ";\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {\n box-shadow: ").concat(dt('toggleswitch.focus.ring.shadow'), ";\n outline: ").concat(dt('toggleswitch.focus.ring.width'), " ").concat(dt('toggleswitch.focus.ring.style'), " ").concat(dt('toggleswitch.focus.ring.color'), ";\n outline-offset: ").concat(dt('toggleswitch.focus.ring.offset'), ";\n}\n\n.p-toggleswitch.p-invalid > .p-toggleswitch-slider {\n border-color: ").concat(dt('toggleswitch.invalid.border.color'), ";\n}\n\n.p-toggleswitch.p-disabled {\n opacity: 1;\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-slider {\n background: ").concat(dt('toggleswitch.disabled.background'), ";\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-handle {\n background: ").concat(dt('toggleswitch.handle.disabled.background'), ";\n}\n");
6
6
  };
7
7
  var inlineStyles = {
8
8
  root: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/toggleswitch/style/ToggleSwitchStyle.js"],"sourcesContent":["import BaseStyle from '@primevue/core/base/style';\n\nconst theme = ({ dt }) => `\n.p-toggleswitch {\n display: inline-block;\n width: ${dt('toggleswitch.width')};\n height: ${dt('toggleswitch.height')};\n}\n\n.p-toggleswitch-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border-radius: ${dt('toggleswitch.border.radius')};\n}\n\n.p-toggleswitch-slider {\n display: inline-block;\n cursor: pointer;\n width: 100%;\n height: 100%;\n border-width: ${dt('toggleswitch.border.width')};\n border-style: solid;\n border-color: ${dt('toggleswitch.border.color')};\n background: ${dt('toggleswitch.background')};\n transition: background ${dt('toggleswitch.transition.duration')}, color ${dt('toggleswitch.transition.duration')}, border-color ${dt('toggleswitch.transition.duration')}, outline-color ${dt('toggleswitch.transition.duration')}, box-shadow ${dt(\n 'toggleswitch.transition.duration'\n)};\n border-radius: ${dt('toggleswitch.border.radius')};\n outline-color: transparent;\n box-shadow: ${dt('toggleswitch.shadow')};\n}\n\n.p-toggleswitch-handle {\n position: absolute;\n top: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: ${dt('toggleswitch.handle.background')};\n color: ${dt('toggleswitch.handle.color')};\n width: ${dt('toggleswitch.handle.size')};\n height: ${dt('toggleswitch.handle.size')};\n inset-inline-start: ${dt('toggleswitch.gap')};\n margin-block-start: calc(-1 * calc(${dt('toggleswitch.handle.size')} / 2));\n border-radius: ${dt('toggleswitch.handle.border.radius')};\n transition: background ${dt('toggleswitch.transition.duration')}, color ${dt('toggleswitch.transition.duration')}, inset-inline-start ${dt('toggleswitch.slide.duration')}, box-shadow ${dt('toggleswitch.slide.duration')};\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {\n background: ${dt('toggleswitch.checked.background')};\n border-color: ${dt('toggleswitch.checked.border.color')};\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.checked.background')};\n color: ${dt('toggleswitch.handle.checked.color')};\n inset-inline-start: calc(${dt('toggleswitch.width')} - calc(${dt('toggleswitch.handle.size')} + ${dt('toggleswitch.gap')}));\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {\n background: ${dt('toggleswitch.hover.background')};\n border-color: ${dt('toggleswitch.hover.border.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.hover.background')};\n color: ${dt('toggleswitch.handle.hover.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {\n background: ${dt('toggleswitch.checked.hover.background')};\n border-color: ${dt('toggleswitch.checked.hover.border.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.checked.hover.background')};\n color: ${dt('toggleswitch.handle.checked.hover.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {\n box-shadow: ${dt('toggleswitch.focus.ring.shadow')};\n outline: ${dt('toggleswitch.focus.ring.width')} ${dt('toggleswitch.focus.ring.style')} ${dt('toggleswitch.focus.ring.color')};\n outline-offset: ${dt('toggleswitch.focus.ring.offset')};\n}\n\n.p-toggleswitch.p-invalid > .p-toggleswitch-slider {\n border-color: ${dt('toggleswitch.invalid.border.color')};\n}\n\n.p-toggleswitch.p-disabled {\n opacity: 1;\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-slider {\n background: ${dt('toggleswitch.disabled.background')};\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.disabled.background')};\n}\n`;\n\nconst inlineStyles = {\n root: { position: 'relative' }\n};\n\nconst classes = {\n root: ({ instance, props }) => [\n 'p-toggleswitch p-component',\n {\n 'p-toggleswitch-checked': instance.checked,\n 'p-disabled': props.disabled,\n 'p-invalid': instance.$invalid\n }\n ],\n input: 'p-toggleswitch-input',\n slider: 'p-toggleswitch-slider',\n handle: 'p-toggleswitch-handle'\n};\n\nexport default BaseStyle.extend({\n name: 'toggleswitch',\n theme,\n classes,\n inlineStyles\n});\n"],"names":["theme","_ref","dt","concat","inlineStyles","root","position","classes","_ref2","instance","props","checked","disabled","$invalid","input","slider","handle","BaseStyle","extend","name"],"mappings":";;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,EAAE,GAAAD,IAAA,CAAFC,EAAE;AAAA,EAAA,OAAA,8DAAA,CAAAC,MAAA,CAGND,EAAE,CAAC,oBAAoB,CAAC,EAAAC,iBAAAA,CAAAA,CAAAA,MAAA,CACvBD,EAAE,CAAC,qBAAqB,CAAC,EAAAC,mSAAAA,CAAAA,CAAAA,MAAA,CAgBlBD,EAAE,CAAC,4BAA4B,CAAC,iJAAAC,MAAA,CAQjCD,EAAE,CAAC,2BAA2B,CAAC,EAAA,iDAAA,CAAA,CAAAC,MAAA,CAE/BD,EAAE,CAAC,2BAA2B,CAAC,EAAAC,qBAAAA,CAAAA,CAAAA,MAAA,CACjCD,EAAE,CAAC,yBAAyB,CAAC,oCAAAC,MAAA,CAClBD,EAAE,CAAC,kCAAkC,CAAC,EAAA,UAAA,CAAA,CAAAC,MAAA,CAAWD,EAAE,CAAC,kCAAkC,CAAC,EAAA,iBAAA,CAAA,CAAAC,MAAA,CAAkBD,EAAE,CAAC,kCAAkC,CAAC,EAAAC,kBAAAA,CAAAA,CAAAA,MAAA,CAAmBD,EAAE,CAAC,kCAAkC,CAAC,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,EAAE;AAAW;AACjC,CAAC;AAED,IAAMC,OAAO,GAAG;AACZF,EAAAA,IAAI,EAAE,SAANA,IAAIA,CAAAG,KAAA,EAAA;AAAA,IAAA,IAAKC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;MAAEC,KAAK,GAAAF,KAAA,CAALE,KAAK;IAAA,OAAO,CAC3B,4BAA4B,EAC5B;MACI,wBAAwB,EAAED,QAAQ,CAACE,OAAO;MAC1C,YAAY,EAAED,KAAK,CAACE,QAAQ;MAC5B,WAAW,EAAEH,QAAQ,CAACI;AAC1B,KAAC,CACJ;AAAA,GAAA;AACDC,EAAAA,KAAK,EAAE,sBAAsB;AAC7BC,EAAAA,MAAM,EAAE,uBAAuB;AAC/BC,EAAAA,MAAM,EAAE;AACZ,CAAC;AAED,wBAAeC,SAAS,CAACC,MAAM,CAAC;AAC5BC,EAAAA,IAAI,EAAE,cAAc;AACpBnB,EAAAA,KAAK,EAALA,KAAK;AACLO,EAAAA,OAAO,EAAPA,OAAO;AACPH,EAAAA,YAAY,EAAZA;AACJ,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/toggleswitch/style/ToggleSwitchStyle.js"],"sourcesContent":["import BaseStyle from '@primevue/core/base/style';\n\nconst theme = ({ dt }) => `\n.p-toggleswitch {\n display: inline-block;\n width: ${dt('toggleswitch.width')};\n height: ${dt('toggleswitch.height')};\n}\n\n.p-toggleswitch-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border-radius: ${dt('toggleswitch.border.radius')};\n}\n\n.p-toggleswitch-slider {\n cursor: pointer;\n width: 100%;\n height: 100%;\n border-width: ${dt('toggleswitch.border.width')};\n border-style: solid;\n border-color: ${dt('toggleswitch.border.color')};\n background: ${dt('toggleswitch.background')};\n transition: background ${dt('toggleswitch.transition.duration')}, color ${dt('toggleswitch.transition.duration')}, border-color ${dt('toggleswitch.transition.duration')}, outline-color ${dt('toggleswitch.transition.duration')}, box-shadow ${dt(\n 'toggleswitch.transition.duration'\n)};\n border-radius: ${dt('toggleswitch.border.radius')};\n outline-color: transparent;\n box-shadow: ${dt('toggleswitch.shadow')};\n}\n\n.p-toggleswitch-handle {\n position: absolute;\n top: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: ${dt('toggleswitch.handle.background')};\n color: ${dt('toggleswitch.handle.color')};\n width: ${dt('toggleswitch.handle.size')};\n height: ${dt('toggleswitch.handle.size')};\n inset-inline-start: ${dt('toggleswitch.gap')};\n margin-block-start: calc(-1 * calc(${dt('toggleswitch.handle.size')} / 2));\n border-radius: ${dt('toggleswitch.handle.border.radius')};\n transition: background ${dt('toggleswitch.transition.duration')}, color ${dt('toggleswitch.transition.duration')}, inset-inline-start ${dt('toggleswitch.slide.duration')}, box-shadow ${dt('toggleswitch.slide.duration')};\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {\n background: ${dt('toggleswitch.checked.background')};\n border-color: ${dt('toggleswitch.checked.border.color')};\n}\n\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.checked.background')};\n color: ${dt('toggleswitch.handle.checked.color')};\n inset-inline-start: calc(${dt('toggleswitch.width')} - calc(${dt('toggleswitch.handle.size')} + ${dt('toggleswitch.gap')}));\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {\n background: ${dt('toggleswitch.hover.background')};\n border-color: ${dt('toggleswitch.hover.border.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.hover.background')};\n color: ${dt('toggleswitch.handle.hover.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {\n background: ${dt('toggleswitch.checked.hover.background')};\n border-color: ${dt('toggleswitch.checked.hover.border.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.checked.hover.background')};\n color: ${dt('toggleswitch.handle.checked.hover.color')};\n}\n\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {\n box-shadow: ${dt('toggleswitch.focus.ring.shadow')};\n outline: ${dt('toggleswitch.focus.ring.width')} ${dt('toggleswitch.focus.ring.style')} ${dt('toggleswitch.focus.ring.color')};\n outline-offset: ${dt('toggleswitch.focus.ring.offset')};\n}\n\n.p-toggleswitch.p-invalid > .p-toggleswitch-slider {\n border-color: ${dt('toggleswitch.invalid.border.color')};\n}\n\n.p-toggleswitch.p-disabled {\n opacity: 1;\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-slider {\n background: ${dt('toggleswitch.disabled.background')};\n}\n\n.p-toggleswitch.p-disabled .p-toggleswitch-handle {\n background: ${dt('toggleswitch.handle.disabled.background')};\n}\n`;\n\nconst inlineStyles = {\n root: { position: 'relative' }\n};\n\nconst classes = {\n root: ({ instance, props }) => [\n 'p-toggleswitch p-component',\n {\n 'p-toggleswitch-checked': instance.checked,\n 'p-disabled': props.disabled,\n 'p-invalid': instance.$invalid\n }\n ],\n input: 'p-toggleswitch-input',\n slider: 'p-toggleswitch-slider',\n handle: 'p-toggleswitch-handle'\n};\n\nexport default BaseStyle.extend({\n name: 'toggleswitch',\n theme,\n classes,\n inlineStyles\n});\n"],"names":["theme","_ref","dt","concat","inlineStyles","root","position","classes","_ref2","instance","props","checked","disabled","$invalid","input","slider","handle","BaseStyle","extend","name"],"mappings":";;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,EAAE,GAAAD,IAAA,CAAFC,EAAE;AAAA,EAAA,OAAA,8DAAA,CAAAC,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A,OAAO;AACPH,EAAAA,YAAY,EAAZA;AACJ,CAAC,CAAC;;;;"}
@@ -21,6 +21,7 @@
21
21
  :modelValue="checked"
22
22
  :binary="true"
23
23
  :class="cx('pcNodeCheckbox')"
24
+ :disabled="node.selectable === false"
24
25
  @change="toggleCheckbox"
25
26
  :tabindex="-1"
26
27
  :indeterminate="partialChecked"
@@ -810,6 +810,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
810
810
  modelValue: $props.checked,
811
811
  binary: true,
812
812
  "class": normalizeClass(_ctx.cx('pcNodeCheckbox')),
813
+ disabled: $props.node.selectable === false,
813
814
  onChange: $options.toggleCheckbox,
814
815
  tabindex: -1,
815
816
  indeterminate: $props.partialChecked,
@@ -826,7 +827,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
826
827
  }, null, 8, ["checked", "partialChecked", "class"])) : createCommentVNode("", true)];
827
828
  }),
828
829
  _: 1
829
- }, 8, ["modelValue", "class", "onChange", "indeterminate", "unstyled", "pt", "data-p-partialchecked"])) : createCommentVNode("", true), $props.column.children && $props.column.children.body ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.body), {
830
+ }, 8, ["modelValue", "class", "disabled", "onChange", "indeterminate", "unstyled", "pt", "data-p-partialchecked"])) : createCommentVNode("", true), $props.column.children && $props.column.children.body ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.body), {
830
831
  key: 2,
831
832
  node: $props.node,
832
833
  column: $props.column