@cratis/scene.primereact 4.13.0 → 4.14.0

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.
Files changed (47) hide show
  1. package/data/PrimeDataTable.tsx +13 -2
  2. package/dist/cjs/data/PrimeDataTable.js +15 -2
  3. package/dist/cjs/data/PrimeDataTable.js.map +1 -1
  4. package/dist/cjs/form/PrimeCalendar.js +2 -1
  5. package/dist/cjs/form/PrimeCalendar.js.map +1 -1
  6. package/dist/cjs/form/PrimeCheckbox.js +1 -0
  7. package/dist/cjs/form/PrimeCheckbox.js.map +1 -1
  8. package/dist/cjs/form/PrimeDropdown.js +1 -0
  9. package/dist/cjs/form/PrimeDropdown.js.map +1 -1
  10. package/dist/cjs/form/PrimeInputNumber.js +2 -1
  11. package/dist/cjs/form/PrimeInputNumber.js.map +1 -1
  12. package/dist/cjs/form/PrimeInputText.js +1 -0
  13. package/dist/cjs/form/PrimeInputText.js.map +1 -1
  14. package/dist/cjs/form/PrimeInputTextarea.js +1 -0
  15. package/dist/cjs/form/PrimeInputTextarea.js.map +1 -1
  16. package/dist/cjs/form/PrimePassword.js +1 -0
  17. package/dist/cjs/form/PrimePassword.js.map +1 -1
  18. package/dist/esm/data/PrimeDataTable.d.ts.map +1 -1
  19. package/dist/esm/data/PrimeDataTable.js +16 -3
  20. package/dist/esm/data/PrimeDataTable.js.map +1 -1
  21. package/dist/esm/form/PrimeCalendar.js +2 -1
  22. package/dist/esm/form/PrimeCalendar.js.map +1 -1
  23. package/dist/esm/form/PrimeCheckbox.d.ts.map +1 -1
  24. package/dist/esm/form/PrimeCheckbox.js +1 -0
  25. package/dist/esm/form/PrimeCheckbox.js.map +1 -1
  26. package/dist/esm/form/PrimeDropdown.js +1 -0
  27. package/dist/esm/form/PrimeDropdown.js.map +1 -1
  28. package/dist/esm/form/PrimeInputNumber.js +2 -1
  29. package/dist/esm/form/PrimeInputNumber.js.map +1 -1
  30. package/dist/esm/form/PrimeInputText.d.ts.map +1 -1
  31. package/dist/esm/form/PrimeInputText.js +1 -0
  32. package/dist/esm/form/PrimeInputText.js.map +1 -1
  33. package/dist/esm/form/PrimeInputTextarea.d.ts.map +1 -1
  34. package/dist/esm/form/PrimeInputTextarea.js +1 -0
  35. package/dist/esm/form/PrimeInputTextarea.js.map +1 -1
  36. package/dist/esm/form/PrimePassword.d.ts.map +1 -1
  37. package/dist/esm/form/PrimePassword.js +1 -0
  38. package/dist/esm/form/PrimePassword.js.map +1 -1
  39. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  40. package/form/PrimeCalendar.tsx +1 -1
  41. package/form/PrimeCheckbox.tsx +1 -0
  42. package/form/PrimeDropdown.tsx +1 -1
  43. package/form/PrimeInputNumber.tsx +1 -1
  44. package/form/PrimeInputText.tsx +1 -0
  45. package/form/PrimeInputTextarea.tsx +1 -0
  46. package/form/PrimePassword.tsx +1 -0
  47. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCheckbox.js","sources":["../../../form/PrimeCheckbox.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Checkbox } from 'primereact/checkbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:checkbox` component.\n *\n * Rendered with its label rather than bare: an unlabeled checkbox has no accessible name and nothing to\n * click but a 20-pixel box, which is a defect in every screen that would ever use one.\n *\n * PrimeReact 11 makes the tick its own part: `Root` renders the real (visually hidden) input and owns the\n * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state\n * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be\n * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.\n */\nexport function PrimeCheckbox({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <Checkbox.Root\n inputId={element.id}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Checkbox.Box>\n <Checkbox.Indicator />\n </Checkbox.Box>\n </Checkbox.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeCheckbox","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","Checkbox","Root","inputId","onCheckedChange","event","disabled","Box","Indicator","undefined","htmlFor"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,QAAAA,CAASC,eAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,eAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,GAAA,CAACC,SAASC,IAAI,EAAA;AACVC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;gBACnBT,OAAAA,EAASA,OAAAA;AACTe,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUf,UAAAA,CAAWe,KAAAA,CAAMhB,OAAO,CAAA;gBACpDiB,QAAAA,EAAUd,eAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,GAAA,CAACC,SAASM,GAAG,EAAA;4CACTP,GAAA,CAACC,SAASO,SAAS,EAAA,EAAA;;;AAG1Bf,YAAAA,KAAAA,KAAUgB,2BAAaT,GAAA,CAACP,OAAAA,EAAAA;AAAMiB,gBAAAA,OAAAA,EAAStB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;"}
1
+ {"version":3,"file":"PrimeCheckbox.js","sources":["../../../form/PrimeCheckbox.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Checkbox } from 'primereact/checkbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:checkbox` component.\n *\n * Rendered with its label rather than bare: an unlabeled checkbox has no accessible name and nothing to\n * click but a 20-pixel box, which is a defect in every screen that would ever use one.\n *\n * PrimeReact 11 makes the tick its own part: `Root` renders the real (visually hidden) input and owns the\n * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state\n * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be\n * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.\n */\nexport function PrimeCheckbox({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <Checkbox.Root\n inputId={element.id}\n aria-label={label === undefined ? stringProperty(element, 'ariaLabel') : undefined}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Checkbox.Box>\n <Checkbox.Indicator />\n </Checkbox.Box>\n </Checkbox.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeCheckbox","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","Checkbox","Root","inputId","aria-label","undefined","onCheckedChange","event","disabled","Box","Indicator","htmlFor"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,QAAAA,CAASC,eAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,eAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,GAAA,CAACC,SAASC,IAAI,EAAA;AACVC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;AACnBM,gBAAAA,YAAAA,EAAYX,KAAAA,KAAUY,SAAAA,GAAYX,cAAAA,CAAeN,OAAAA,EAAS,WAAA,CAAA,GAAeiB,SAAAA;gBACzEhB,OAAAA,EAASA,OAAAA;AACTiB,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUjB,UAAAA,CAAWiB,KAAAA,CAAMlB,OAAO,CAAA;gBACpDmB,QAAAA,EAAUhB,eAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,GAAA,CAACC,SAASQ,GAAG,EAAA;4CACTT,GAAA,CAACC,SAASS,SAAS,EAAA,EAAA;;;AAG1BjB,YAAAA,KAAAA,KAAUY,2BAAaL,GAAA,CAACP,OAAAA,EAAAA;AAAMkB,gBAAAA,OAAAA,EAASvB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;"}
@@ -31,6 +31,7 @@ import { stringProperty, booleanProperty, optionsProperty } from '../properties.
31
31
  disabled: booleanProperty(element, 'disabled', false),
32
32
  children: [
33
33
  /*#__PURE__*/ jsxs(Select.Trigger, {
34
+ "aria-label": stringProperty(element, 'ariaLabel'),
34
35
  children: [
35
36
  /*#__PURE__*/ jsx(Select.Value, {
36
37
  placeholder: placeholder
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeDropdown.js","sources":["../../../form/PrimeDropdown.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:dropdown` component - a single-choice select.\n *\n * Options are normalized by `optionsProperty`, so a screen may write either bare strings or\n * `{ label, value }` records and get the same result.\n *\n * PrimeReact calls this `Select`, and it is a composition rather than one component: `Root` owns the\n * value and the option model, `Trigger` is what the user clicks, and the list lives behind a `Portal` so\n * it escapes any clipping ancestor. `Select.List` renders `options` itself - there is no option mapping\n * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`\n * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks\n * correctly on its own.\n */\nexport function PrimeDropdown({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n const showClear = booleanProperty(element, 'showClear', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n {showClear && <Select.Clear />}\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeDropdown","element","value","setValue","useState","stringProperty","placeholder","filter","booleanProperty","showClear","_jsxs","Select","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Clear","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAAkBC,eAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACpE,MAAMK,WAAAA,GAAcD,cAAAA,CAAeJ,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMM,MAAAA,GAASC,eAAAA,CAAgBP,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,MAAMQ,SAAAA,GAAYD,eAAAA,CAAgBP,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA;IACxD,qBACIS,IAAA,CAACC,OAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeZ,QAAQa,EAAE;QACzBZ,KAAAA,EAAOA,KAAAA;AACPa,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUb,QAAAA,CAASa,KAAAA,CAAMd,KAAK,CAAA;AAC9Ce,QAAAA,OAAAA,EAASC,gBAAgBjB,OAAAA,EAAS,SAAA,CAAA;QAClCkB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,eAAAA,CAAgBP,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAS,IAAA,CAACC,OAAOW,OAAO,EAAA;;AACX,kCAAAC,GAAA,CAACZ,OAAOa,KAAK,EAAA;wBAAClB,WAAAA,EAAaA;;oBAC1BG,SAAAA,kBAAac,GAAA,CAACZ,OAAOc,KAAK,EAAA,EAAA,CAAA;AAC3B,kCAAAF,GAAA,CAACZ,OAAOe,KAAK,EAAA,EAAA;;;AAEjB,0BAAAH,GAAA,CAACZ,OAAOgB,MAAM,EAAA;wCACVJ,GAAA,CAACZ,OAAOiB,UAAU,EAAA;4CACdlB,IAAA,CAACC,OAAOkB,KAAK,EAAA;;4BACRtB,MAAAA,kBAAUgB,GAAA,CAACZ,OAAOmB,MAAM,EAAA;gCAACxB,WAAAA,EAAaA;;AACvC,0CAAAiB,GAAA,CAACZ,OAAOoB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
1
+ {"version":3,"file":"PrimeDropdown.js","sources":["../../../form/PrimeDropdown.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:dropdown` component - a single-choice select.\n *\n * Options are normalized by `optionsProperty`, so a screen may write either bare strings or\n * `{ label, value }` records and get the same result.\n *\n * PrimeReact calls this `Select`, and it is a composition rather than one component: `Root` owns the\n * value and the option model, `Trigger` is what the user clicks, and the list lives behind a `Portal` so\n * it escapes any clipping ancestor. `Select.List` renders `options` itself - there is no option mapping\n * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`\n * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks\n * correctly on its own.\n */\nexport function PrimeDropdown({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n const showClear = booleanProperty(element, 'showClear', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger aria-label={stringProperty(element, 'ariaLabel')}>\n <Select.Value placeholder={placeholder} />\n {showClear && <Select.Clear />}\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeDropdown","element","value","setValue","useState","stringProperty","placeholder","filter","booleanProperty","showClear","_jsxs","Select","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","aria-label","_jsx","Value","Clear","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAAkBC,eAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACpE,MAAMK,WAAAA,GAAcD,cAAAA,CAAeJ,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMM,MAAAA,GAASC,eAAAA,CAAgBP,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,MAAMQ,SAAAA,GAAYD,eAAAA,CAAgBP,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA;IACxD,qBACIS,IAAA,CAACC,OAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeZ,QAAQa,EAAE;QACzBZ,KAAAA,EAAOA,KAAAA;AACPa,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUb,QAAAA,CAASa,KAAAA,CAAMd,KAAK,CAAA;AAC9Ce,QAAAA,OAAAA,EAASC,gBAAgBjB,OAAAA,EAAS,SAAA,CAAA;QAClCkB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,eAAAA,CAAgBP,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAS,IAAA,CAACC,OAAOW,OAAO,EAAA;AAACC,gBAAAA,YAAAA,EAAYlB,eAAeJ,OAAAA,EAAS,WAAA,CAAA;;AAChD,kCAAAuB,GAAA,CAACb,OAAOc,KAAK,EAAA;wBAACnB,WAAAA,EAAaA;;oBAC1BG,SAAAA,kBAAae,GAAA,CAACb,OAAOe,KAAK,EAAA,EAAA,CAAA;AAC3B,kCAAAF,GAAA,CAACb,OAAOgB,KAAK,EAAA,EAAA;;;AAEjB,0BAAAH,GAAA,CAACb,OAAOiB,MAAM,EAAA;wCACVJ,GAAA,CAACb,OAAOkB,UAAU,EAAA;4CACdnB,IAAA,CAACC,OAAOmB,KAAK,EAAA;;4BACRvB,MAAAA,kBAAUiB,GAAA,CAACb,OAAOoB,MAAM,EAAA;gCAACzB,WAAAA,EAAaA;;AACvC,0CAAAkB,GAAA,CAACb,OAAOqB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
@@ -27,7 +27,8 @@ import { numberProperty, stringProperty, booleanProperty } from '../properties.j
27
27
  disabled: booleanProperty(element, 'disabled', false),
28
28
  children: [
29
29
  /*#__PURE__*/ jsx(InputNumber.Input, {
30
- placeholder: stringProperty(element, 'placeholder')
30
+ placeholder: stringProperty(element, 'placeholder'),
31
+ "aria-label": stringProperty(element, 'ariaLabel')
31
32
  }),
32
33
  booleanProperty(element, 'showButtons', false) && /*#__PURE__*/ jsxs(InputNumber.Group, {
33
34
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputNumber.js","sources":["../../../form/PrimeInputNumber.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputNumber` component - a numeric field with locale-aware formatting.\n *\n * `mode` and `currency` are passed straight through because that is where InputNumber earns its keep\n * over a plain text field: it formats and parses in the user's locale rather than making a screen do it.\n *\n * PrimeReact 11 splits the component in two: `Root` holds the number model and `Input` is the field it\n * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`\n * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`\n * you either render or do not - so the property now decides whether that group exists at all.\n */\nexport function PrimeInputNumber({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const currency = stringProperty(element, 'currency');\n return (\n <InputNumber.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : undefined)}\n mode={currency === undefined ? 'decimal' : 'currency'}\n currency={currency}\n min={numberProperty(element, 'min')}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputNumber.Input placeholder={stringProperty(element, 'placeholder')} />\n {booleanProperty(element, 'showButtons', false) && (\n <InputNumber.Group>\n <InputNumber.Increment>\n <i className='pi pi-chevron-up' />\n </InputNumber.Increment>\n <InputNumber.Decrement>\n <i className='pi pi-chevron-down' />\n </InputNumber.Decrement>\n </InputNumber.Group>\n )}\n </InputNumber.Root>\n );\n}\n"],"names":["PrimeInputNumber","element","value","setValue","useState","numberProperty","currency","stringProperty","_jsxs","InputNumber","Root","data-scene-id","id","onValueChange","event","undefined","mode","min","max","disabled","booleanProperty","_jsx","Input","placeholder","Group","Increment","i","className","Decrement"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAA6BC,eAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,QAAAA,GAAWC,eAAeN,OAAAA,EAAS,UAAA,CAAA;IACzC,qBACIO,IAAA,CAACC,YAAYC,IAAI,EAAA;AACbC,QAAAA,eAAAA,EAAeV,QAAQW,EAAE;QACzBV,KAAAA,EAAOA,KAAAA;QACPW,aAAAA,EAAe,CAACC,KAAAA,GAAUX,QAAAA,CAAS,OAAOW,KAAAA,CAAMZ,KAAK,KAAK,QAAA,GAAWY,KAAAA,CAAMZ,KAAK,GAAGa,SAAAA,CAAAA;QACnFC,IAAAA,EAAMV,QAAAA,KAAaS,YAAY,SAAA,GAAY,UAAA;QAC3CT,QAAAA,EAAUA,QAAAA;AACVW,QAAAA,GAAAA,EAAKZ,eAAeJ,OAAAA,EAAS,KAAA,CAAA;AAC7BiB,QAAAA,GAAAA,EAAKb,eAAeJ,OAAAA,EAAS,KAAA,CAAA;QAC7BkB,QAAAA,EAAUC,eAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAoB,GAAA,CAACZ,YAAYa,KAAK,EAAA;AAACC,gBAAAA,WAAAA,EAAahB,eAAeN,OAAAA,EAAS,aAAA;;AACvDmB,YAAAA,eAAAA,CAAgBnB,OAAAA,EAAS,aAAA,EAAe,KAAA,CAAA,kBACrCO,IAAA,CAACC,YAAYe,KAAK,EAAA;;AACd,kCAAAH,GAAA,CAACZ,YAAYgB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAJ,GAAA,CAACK,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;AAEjB,kCAAAN,GAAA,CAACZ,YAAYmB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAP,GAAA,CAACK,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;;;;;AAMrC;;"}
1
+ {"version":3,"file":"PrimeInputNumber.js","sources":["../../../form/PrimeInputNumber.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputNumber` component - a numeric field with locale-aware formatting.\n *\n * `mode` and `currency` are passed straight through because that is where InputNumber earns its keep\n * over a plain text field: it formats and parses in the user's locale rather than making a screen do it.\n *\n * PrimeReact 11 splits the component in two: `Root` holds the number model and `Input` is the field it\n * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`\n * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`\n * you either render or do not - so the property now decides whether that group exists at all.\n */\nexport function PrimeInputNumber({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const currency = stringProperty(element, 'currency');\n return (\n <InputNumber.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : undefined)}\n mode={currency === undefined ? 'decimal' : 'currency'}\n currency={currency}\n min={numberProperty(element, 'min')}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputNumber.Input placeholder={stringProperty(element, 'placeholder')} aria-label={stringProperty(element, 'ariaLabel')} />\n {booleanProperty(element, 'showButtons', false) && (\n <InputNumber.Group>\n <InputNumber.Increment>\n <i className='pi pi-chevron-up' />\n </InputNumber.Increment>\n <InputNumber.Decrement>\n <i className='pi pi-chevron-down' />\n </InputNumber.Decrement>\n </InputNumber.Group>\n )}\n </InputNumber.Root>\n );\n}\n"],"names":["PrimeInputNumber","element","value","setValue","useState","numberProperty","currency","stringProperty","_jsxs","InputNumber","Root","data-scene-id","id","onValueChange","event","undefined","mode","min","max","disabled","booleanProperty","_jsx","Input","placeholder","aria-label","Group","Increment","i","className","Decrement"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAA6BC,eAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,QAAAA,GAAWC,eAAeN,OAAAA,EAAS,UAAA,CAAA;IACzC,qBACIO,IAAA,CAACC,YAAYC,IAAI,EAAA;AACbC,QAAAA,eAAAA,EAAeV,QAAQW,EAAE;QACzBV,KAAAA,EAAOA,KAAAA;QACPW,aAAAA,EAAe,CAACC,KAAAA,GAAUX,QAAAA,CAAS,OAAOW,KAAAA,CAAMZ,KAAK,KAAK,QAAA,GAAWY,KAAAA,CAAMZ,KAAK,GAAGa,SAAAA,CAAAA;QACnFC,IAAAA,EAAMV,QAAAA,KAAaS,YAAY,SAAA,GAAY,UAAA;QAC3CT,QAAAA,EAAUA,QAAAA;AACVW,QAAAA,GAAAA,EAAKZ,eAAeJ,OAAAA,EAAS,KAAA,CAAA;AAC7BiB,QAAAA,GAAAA,EAAKb,eAAeJ,OAAAA,EAAS,KAAA,CAAA;QAC7BkB,QAAAA,EAAUC,eAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAoB,GAAA,CAACZ,YAAYa,KAAK,EAAA;AAACC,gBAAAA,WAAAA,EAAahB,eAAeN,OAAAA,EAAS,aAAA,CAAA;AAAgBuB,gBAAAA,YAAAA,EAAYjB,eAAeN,OAAAA,EAAS,WAAA;;AAC3GmB,YAAAA,eAAAA,CAAgBnB,OAAAA,EAAS,aAAA,EAAe,KAAA,CAAA,kBACrCO,IAAA,CAACC,YAAYgB,KAAK,EAAA;;AACd,kCAAAJ,GAAA,CAACZ,YAAYiB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAL,GAAA,CAACM,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;AAEjB,kCAAAP,GAAA,CAACZ,YAAYoB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAR,GAAA,CAACM,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;;;;;AAMrC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputText.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputText.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAY/D,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAanE"}
1
+ {"version":3,"file":"PrimeInputText.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputText.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAY/D,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAcnE"}
@@ -18,6 +18,7 @@ import { stringProperty, booleanProperty } from '../properties.js';
18
18
  value: value,
19
19
  onChange: (event)=>setValue(event.target.value),
20
20
  placeholder: stringProperty(element, 'placeholder'),
21
+ "aria-label": stringProperty(element, 'ariaLabel'),
21
22
  disabled: booleanProperty(element, 'disabled', false),
22
23
  readOnly: booleanProperty(element, 'readOnly', false),
23
24
  invalid: booleanProperty(element, 'invalid', false)
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputText.js","sources":["../../../form/PrimeInputText.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputText` component - a single-line text field.\n *\n * PrimeReact inputs are controlled, and a Scene element has nowhere to put \"what the user has typed so\n * far\" - `properties` is authored design-time configuration, not live state. The adapter therefore owns\n * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:\n * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered\n * component rather than pushed back into the model.\n */\nexport function PrimeInputText({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputText\n data-scene-id={element.id}\n value={value}\n onChange={(event) => setValue(event.target.value)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n invalid={booleanProperty(element, 'invalid', false)}\n />\n );\n}\n"],"names":["PrimeInputText","element","value","setValue","useState","stringProperty","_jsx","InputText","data-scene-id","id","onChange","event","target","placeholder","disabled","booleanProperty","readOnly","invalid"],"mappings":";;;;;AAQA;;;;;;;;AAQC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,SAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;AAChDW,QAAAA,WAAAA,EAAaR,eAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCa,QAAAA,EAAUC,eAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/Ce,QAAAA,EAAUD,eAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CgB,OAAAA,EAASF,eAAAA,CAAgBd,SAAS,SAAA,EAAW,KAAA;;AAGzD;;"}
1
+ {"version":3,"file":"PrimeInputText.js","sources":["../../../form/PrimeInputText.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputText` component - a single-line text field.\n *\n * PrimeReact inputs are controlled, and a Scene element has nowhere to put \"what the user has typed so\n * far\" - `properties` is authored design-time configuration, not live state. The adapter therefore owns\n * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:\n * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered\n * component rather than pushed back into the model.\n */\nexport function PrimeInputText({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputText\n data-scene-id={element.id}\n value={value}\n onChange={(event) => setValue(event.target.value)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n invalid={booleanProperty(element, 'invalid', false)}\n />\n );\n}\n"],"names":["PrimeInputText","element","value","setValue","useState","stringProperty","_jsx","InputText","data-scene-id","id","onChange","event","target","placeholder","aria-label","disabled","booleanProperty","readOnly","invalid"],"mappings":";;;;;AAQA;;;;;;;;AAQC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,SAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;AAChDW,QAAAA,WAAAA,EAAaR,eAAeJ,OAAAA,EAAS,aAAA,CAAA;AACrCa,QAAAA,YAAAA,EAAYT,eAAeJ,OAAAA,EAAS,WAAA,CAAA;QACpCc,QAAAA,EAAUC,eAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CgB,QAAAA,EAAUD,eAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CiB,OAAAA,EAASF,eAAAA,CAAgBf,SAAS,SAAA,EAAW,KAAA;;AAGzD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputTextarea.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputTextarea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAcvE"}
1
+ {"version":3,"file":"PrimeInputTextarea.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputTextarea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAevE"}
@@ -19,6 +19,7 @@ import { stringProperty, booleanProperty, numberProperty } from '../properties.j
19
19
  cols: numberProperty(element, 'cols'),
20
20
  autoResize: booleanProperty(element, 'autoResize', false),
21
21
  placeholder: stringProperty(element, 'placeholder'),
22
+ "aria-label": stringProperty(element, 'ariaLabel'),
22
23
  disabled: booleanProperty(element, 'disabled', false)
23
24
  });
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputTextarea.js","sources":["../../../form/PrimeInputTextarea.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ChangeEvent, useState } from 'react';\nimport { Textarea } from 'primereact/textarea';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputTextarea` component - a multi-line text field, named `Textarea` by PrimeReact 11.\n *\n * One of the few components the version change left alone beyond its name: it is still a single element\n * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`\n * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.\n */\nexport function PrimeInputTextarea({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <Textarea\n data-scene-id={element.id}\n value={value}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) => setValue(event.target.value)}\n rows={numberProperty(element, 'rows', 4)}\n cols={numberProperty(element, 'cols')}\n autoResize={booleanProperty(element, 'autoResize', false)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeInputTextarea","element","value","setValue","useState","stringProperty","_jsx","Textarea","data-scene-id","id","onChange","event","target","rows","numberProperty","cols","autoResize","booleanProperty","placeholder","disabled"],"mappings":";;;;;AAQA;;;;;;AAMC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,QAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAA4CR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;QAClFW,IAAAA,EAAMC,cAAAA,CAAeb,SAAS,MAAA,EAAQ,CAAA,CAAA;AACtCc,QAAAA,IAAAA,EAAMD,eAAeb,OAAAA,EAAS,MAAA,CAAA;QAC9Be,UAAAA,EAAYC,eAAAA,CAAgBhB,SAAS,YAAA,EAAc,KAAA,CAAA;AACnDiB,QAAAA,WAAAA,EAAab,eAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCkB,QAAAA,EAAUF,eAAAA,CAAgBhB,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
1
+ {"version":3,"file":"PrimeInputTextarea.js","sources":["../../../form/PrimeInputTextarea.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ChangeEvent, useState } from 'react';\nimport { Textarea } from 'primereact/textarea';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputTextarea` component - a multi-line text field, named `Textarea` by PrimeReact 11.\n *\n * One of the few components the version change left alone beyond its name: it is still a single element\n * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`\n * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.\n */\nexport function PrimeInputTextarea({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <Textarea\n data-scene-id={element.id}\n value={value}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) => setValue(event.target.value)}\n rows={numberProperty(element, 'rows', 4)}\n cols={numberProperty(element, 'cols')}\n autoResize={booleanProperty(element, 'autoResize', false)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeInputTextarea","element","value","setValue","useState","stringProperty","_jsx","Textarea","data-scene-id","id","onChange","event","target","rows","numberProperty","cols","autoResize","booleanProperty","placeholder","aria-label","disabled"],"mappings":";;;;;AAQA;;;;;;AAMC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,QAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAA4CR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;QAClFW,IAAAA,EAAMC,cAAAA,CAAeb,SAAS,MAAA,EAAQ,CAAA,CAAA;AACtCc,QAAAA,IAAAA,EAAMD,eAAeb,OAAAA,EAAS,MAAA,CAAA;QAC9Be,UAAAA,EAAYC,eAAAA,CAAgBhB,SAAS,YAAA,EAAc,KAAA,CAAA;AACnDiB,QAAAA,WAAAA,EAAab,eAAeJ,OAAAA,EAAS,aAAA,CAAA;AACrCkB,QAAAA,YAAAA,EAAYd,eAAeJ,OAAAA,EAAS,WAAA,CAAA;QACpCmB,QAAAA,EAAUH,eAAAA,CAAgBhB,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimePassword.d.ts","sourceRoot":"","sources":["../../../form/PrimePassword.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAa/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAYlE"}
1
+ {"version":3,"file":"PrimePassword.d.ts","sourceRoot":"","sources":["../../../form/PrimePassword.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAa/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAalE"}
@@ -20,6 +20,7 @@ import { stringProperty, booleanProperty } from '../properties.js';
20
20
  onValueChange: (event)=>setValue(event.value ?? ''),
21
21
  mask: booleanProperty(element, 'mask', true),
22
22
  placeholder: stringProperty(element, 'placeholder'),
23
+ "aria-label": stringProperty(element, 'ariaLabel'),
23
24
  disabled: booleanProperty(element, 'disabled', false)
24
25
  });
25
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PrimePassword.js","sources":["../../../form/PrimePassword.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputPassword } from 'primereact/inputpassword';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:password` component - a masked field, named `InputPassword` by PrimeReact 11.\n *\n * v11 pared this back to what a password field actually is: an input that renders as `type=\"password\"`\n * until something flips `mask`. The v10 `feedback` strength meter and the `toggleMask` eye button are\n * both gone from the component - there is no prompt/weak/medium/strong panel and no built-in reveal\n * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one\n * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.\n * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.\n */\nexport function PrimePassword({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputPassword\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? '')}\n mask={booleanProperty(element, 'mask', true)}\n placeholder={stringProperty(element, 'placeholder')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimePassword","element","value","setValue","useState","stringProperty","_jsx","InputPassword","data-scene-id","id","onValueChange","event","mask","booleanProperty","placeholder","disabled"],"mappings":";;;;;AAQA;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,aAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,IAAI,EAAA,CAAA;QAClDU,IAAAA,EAAMC,eAAAA,CAAgBZ,SAAS,MAAA,EAAQ,IAAA,CAAA;AACvCa,QAAAA,WAAAA,EAAaT,eAAeJ,OAAAA,EAAS,aAAA,CAAA;QACrCc,QAAAA,EAAUF,eAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
1
+ {"version":3,"file":"PrimePassword.js","sources":["../../../form/PrimePassword.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { InputPassword } from 'primereact/inputpassword';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:password` component - a masked field, named `InputPassword` by PrimeReact 11.\n *\n * v11 pared this back to what a password field actually is: an input that renders as `type=\"password\"`\n * until something flips `mask`. The v10 `feedback` strength meter and the `toggleMask` eye button are\n * both gone from the component - there is no prompt/weak/medium/strong panel and no built-in reveal\n * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one\n * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.\n * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.\n */\nexport function PrimePassword({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputPassword\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? '')}\n mask={booleanProperty(element, 'mask', true)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimePassword","element","value","setValue","useState","stringProperty","_jsx","InputPassword","data-scene-id","id","onValueChange","event","mask","booleanProperty","placeholder","aria-label","disabled"],"mappings":";;;;;AAQA;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,aAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,IAAI,EAAA,CAAA;QAClDU,IAAAA,EAAMC,eAAAA,CAAgBZ,SAAS,MAAA,EAAQ,IAAA,CAAA;AACvCa,QAAAA,WAAAA,EAAaT,eAAeJ,OAAAA,EAAS,aAAA,CAAA;AACrCc,QAAAA,YAAAA,EAAYV,eAAeJ,OAAAA,EAAS,WAAA,CAAA;QACpCe,QAAAA,EAAUH,eAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}