@nxgt/material 3.75.0 → 3.76.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.
- package/CHANGELOG.md +40 -0
- package/README.md +37 -1
- package/dist/{alert-dialog-BfO_ri-N.js → alert-dialog-653apk3f.js} +8 -7
- package/dist/{async-slice-roMAJVzG.js → async-slice-CXLbQuOc.js} +1 -1
- package/dist/{bubble-input-B7BVd9fX.js → bubble-input-CQwVSoU3.js} +30 -29
- package/dist/{button-DgenqmpS.js → button-3op3rtZh.js} +5 -4
- package/dist/calculator-BaSMe0SK.js +1189 -0
- package/dist/calculator-announce-DRd2c6Dq.js +89 -0
- package/dist/calculator-context-BugcKuVG.js +10 -0
- package/dist/calculator-field.js +172 -0
- package/dist/calculator-panel-announce-AZSnZUSr.js +29 -0
- package/dist/calculator-segment-BlJE1LaS.js +22 -0
- package/dist/calculator.js +2 -0
- package/dist/charts.js +3 -3
- package/dist/{chip-CiDczNxO.js → chip-MuKDwtkG.js} +2 -2
- package/dist/{code-editor-CohlhFsA.js → code-editor-Bp2RrdNx.js} +13 -13
- package/dist/code-editor.js +37 -37
- package/dist/{code-language-items-Cs8GLYDp.js → code-language-items-B7WR5ua_.js} +19 -24
- package/dist/components/base-content.css +9 -4
- package/dist/components/ui/collections/server-table/server-table-phone-row.css +10 -3
- package/dist/{components-zJdfH4im.js → components-Ci3Zo8kC.js} +15837 -17245
- package/dist/components.js +37 -28
- package/dist/conversion-variant-BDFAxqe9.js +529 -0
- package/dist/copy-to-clipboard-Be5Ffvs_.js +7 -0
- package/dist/currency-B-r3ig11.js +16 -0
- package/dist/currency-field-BJ9rSrif.js +285 -0
- package/dist/{number.utils-BG_eEt5g.js → date.utils-DUvqcjan.js} +1 -7
- package/dist/dialog-Bm5LvVlB.js +166 -0
- package/dist/dist-BZe2evxL.js +139 -0
- package/dist/dist-CxhKjOYm.js +28 -0
- package/dist/dist-DHdUUM1w.js +241 -0
- package/dist/{dist-C4wtXCjf.js → dist-DOK3zo5C.js} +33 -32
- package/dist/dist-DWZXlCZR.js +182 -0
- package/dist/dist-DkQbkF9T.js +33 -0
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CzR6JP31.js → dropdown-menu-xlZ6NYUA.js} +160 -159
- package/dist/editor.js +299 -298
- package/dist/{empty-state-DjHGMp5F.js → empty-state-C0kviQdW.js} +2 -2
- package/dist/{field-blur-CdASxjL7.js → field-blur-DkiZOVNV.js} +178 -180
- package/dist/{field-blur-context-kZ4SD7xu.js → field-blur-context-BLGgf_3z.js} +2 -2
- package/dist/financial-variant-BsZEa5sF.js +459 -0
- package/dist/{hooks-Dqq8O3Az.js → hooks-Dg94jPRq.js} +12 -12
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BPKqte4a.js → hover-card-B1g55Hi6.js} +44 -43
- package/dist/i18n.js +3 -3
- package/dist/icon-badge-BcW66bRk.js +17 -0
- package/dist/{icon-button-Cr-DyDGg.js → icon-button-Cogxy1cy.js} +5 -4
- package/dist/{in-dialog-Vwkyp-M5.js → in-dialog-D61Yeaol.js} +2 -1
- package/dist/input-CC2joTjB.js +56 -0
- package/dist/key-layout-cR79xfGE.js +38 -0
- package/dist/lib/calculator/index.d.ts +16 -0
- package/dist/lib/calculator-field/index.d.ts +12 -0
- package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -2
- package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +17 -2
- package/dist/lib/components/ui/feedback/moment/moment-passive.d.ts +13 -0
- package/dist/lib/components/ui/feedback/moment/moment.d.ts +16 -2
- package/dist/lib/components/ui/fields/calculator-field/apply-calculated.d.ts +17 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field-content.d.ts +16 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field-trigger.d.ts +4 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field.d.ts +12 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field.types.d.ts +31 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-form-field.d.ts +4 -0
- package/dist/lib/components/ui/fields/calculator-field/index.d.ts +3 -0
- package/dist/lib/components/ui/fields/calculator-field/use-calculator-field.d.ts +15 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/currency-field/currency-field.d.ts +7 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-context.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-announce.d.ts +27 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-clipboard.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-context.d.ts +49 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-feedback.d.ts +18 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-keyboard.d.ts +30 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-storage.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-variant-steps.d.ts +16 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.d.ts +11 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.selectors.d.ts +23 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.slice.d.ts +1881 -0
- package/dist/lib/components/ui/widgets/calculator/currency.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/engine.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/index.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-announcer.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-display.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-key.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +8 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-loading.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-memory.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-announce.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-body.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-screen.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-segment.d.ts +21 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-shell.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-switcher.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-tape.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-tools.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/keypad-navigation.d.ts +24 -0
- package/dist/lib/components/ui/widgets/calculator/types.d.ts +102 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-clipboard.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-conversion.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-feedback.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-keyboard.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-persistence.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-pos.d.ts +25 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-press.d.ts +26 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-tape.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-value.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-variant.d.ts +23 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/use-engine-settings.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-fields.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-labels.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-math.d.ts +31 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-names.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-panel.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-rates.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-result.d.ts +15 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-state.d.ts +36 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/use-conversion.d.ts +24 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-change.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-figures.d.ts +43 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-format.d.ts +12 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan-math.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-margin.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-math.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-panel.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-parts.d.ts +35 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-table.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-vat.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +51 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-announce.d.ts +16 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-aside.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-display.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-fields.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-layout.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-line.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-state.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-tender.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket-data.d.ts +41 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-totals.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-types.d.ts +76 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-vat.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-view.d.ts +28 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-announce.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-base.d.ts +11 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-bitpad.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-display.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-layout.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-readouts.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-reduce.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-state.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-toolbar.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-word.d.ts +15 -0
- package/dist/lib/components/ui/widgets/calculator/variants/registry.d.ts +21 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-layout.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-toolbar.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/standard/standard-layout.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-loader.d.ts +34 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-logic.d.ts +40 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-types.d.ts +62 -0
- package/dist/lib/i18n/resources/en/en.d.ts +412 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +412 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +412 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +412 -0
- package/dist/lib/i18n/resources/resources.d.ts +824 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +4 -3
- package/dist/main.js +50 -40
- package/dist/map.js +66 -65
- package/dist/material.css +1 -1
- package/dist/native-select-w_FlBLHV.js +40 -0
- package/dist/number.utils-CSueQZcv.js +7 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/percent-field-lahyDJDG.js +14 -0
- package/dist/picker-surface-CV09H7Nb.js +1220 -0
- package/dist/popover-Cd7DkND4.js +233 -0
- package/dist/pos-types-DKCkOTYy.js +49 -0
- package/dist/pos-variant-GrUfbTTP.js +603 -0
- package/dist/print.js +1 -1
- package/dist/programmer-variant-eKJNKENL.js +501 -0
- package/dist/programmer-word-CNCF7DJF.js +15 -0
- package/dist/{public-DC9VQw4Z.js → public-y6g4ddxd.js} +895 -892
- package/dist/{rich-code-block-DBSL9zEN.js → rich-code-block-CRQ0iyLb.js} +5 -5
- package/dist/scientific-variant-2y3UxAAU.js +149 -0
- package/dist/{sortable-provider-C4tk5esY.js → sortable-provider-DdiI3Fwk.js} +2 -2
- package/dist/{spinner-B2MubVWb.js → spinner-C1QIewWv.js} +133 -159
- package/dist/standard-layout-BuSRr3TY.js +40 -0
- package/dist/tabs-DzEqMb1W.js +383 -0
- package/dist/{icon-badge-B9uvDoyY.js → text-field-BAdY-kpO.js} +20 -34
- package/dist/theme-picker.js +3 -3
- package/dist/{theme-toggle-BInlu21G.js → theme-toggle-C_VeiiCm.js} +2 -2
- package/dist/toggle-FeCCJqbg.js +40 -0
- package/dist/{toggle-group-DXXlqid2.js → toggle-group-CVMxEpWi.js} +1 -1
- package/dist/{toolbar-items-CRJSx1MU.js → toolbar-items-D310xDuM.js} +333 -554
- package/dist/{translate-material-pVlPJ1v4.js → translate-material-BypJJ1l5.js} +1 -1
- package/dist/{translator-BoYCward.js → translator-DJkf4J7t.js} +824 -0
- package/dist/{typography-B6YMbCge.js → typography-CYEquVeb.js} +1 -1
- package/dist/{use-chat-composer-BvWQogJe.js → use-chat-composer-DMXu9E1O.js} +4198 -4600
- package/dist/{use-heading-spy-B_Z4ArDh.js → use-heading-spy-DJR8YYm6.js} +19 -19
- package/dist/{use-material-translation-CIS2n3RB.js → use-material-translation-CD6QoVal.js} +1 -1
- package/dist/{use-return-focus-DNQtADAR.js → use-return-focus-Cevw_6yq.js} +106 -105
- package/dist/useLatest-C2PnQEeD.js +8 -0
- package/docs/README.md +1 -0
- package/docs/components/feedback-and-status.md +10 -1
- package/docs/components/form-fields.md +1 -0
- package/docs/components/rich-widgets.md +108 -0
- package/docs/getting-started.md +1 -0
- package/docs/guides/calculator.md +468 -0
- package/docs/guides/forms.md +4 -2
- package/docs/guides/i18n.md +5 -0
- package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
- package/docs/previews/rich-widgets-calculator-point-of-sale.webp +0 -0
- package/docs/previews/rich-widgets-calculator.webp +0 -0
- package/docs/roadmap.md +9 -3
- package/docs/troubleshooting.md +134 -0
- package/lib/components/base-content.css +9 -4
- package/lib/components/ui/collections/server-table/server-table-phone-row.css +10 -3
- package/lib/components/ui/widgets/calculator/calculator-bands.css +146 -0
- package/lib/components/ui/widgets/calculator/calculator-display.css +83 -0
- package/lib/components/ui/widgets/calculator/calculator-keys.css +118 -0
- package/lib/components/ui/widgets/calculator/calculator-pos-ticket.css +185 -0
- package/lib/components/ui/widgets/calculator/calculator-pos.css +38 -0
- package/lib/components/ui/widgets/calculator/calculator-tape.css +71 -0
- package/lib/components/ui/widgets/calculator/calculator.css +97 -0
- package/lib/components/ui/widgets/calculator/variants/conversion/conversion.css +98 -0
- package/lib/components/ui/widgets/calculator/variants/financial/financial.css +162 -0
- package/lib/components/ui/widgets/calculator/variants/programmer/programmer.css +162 -0
- package/package.json +17 -3
- package/dist/dialog-AGsB3bv4.js +0 -219
- package/dist/dist-B7RjY7SL.js +0 -158
- package/dist/dist-lmHmz_bu.js +0 -419
package/docs/troubleshooting.md
CHANGED
|
@@ -466,6 +466,21 @@ words in your error.
|
|
|
466
466
|
|
|
467
467
|
- [Reporting a bug](#reporting-a-bug)
|
|
468
468
|
|
|
469
|
+
**Calculator**
|
|
470
|
+
|
|
471
|
+
- [`The calculator is unstyled`](#the-calculator-is-unstyled)
|
|
472
|
+
- [`The calculator does not remember its tape`](#the-calculator-does-not-remember-its-tape)
|
|
473
|
+
- [`This calculator could not be loaded.`](#this-calculator-could-not-be-loaded)
|
|
474
|
+
- [`A calculator key types nothing on the page`](#a-calculator-key-types-nothing-on-the-page)
|
|
475
|
+
- [`Copy or paste does nothing in the calculator`](#copy-or-paste-does-nothing-in-the-calculator)
|
|
476
|
+
- [`The scientific calculator answers "Undefined result"`](#the-scientific-calculator-answers-undefined-result)
|
|
477
|
+
- [`The calculator now shows a switcher`](#the-calculator-now-shows-a-switcher)
|
|
478
|
+
- [`The conversion calculator has no Currency category`](#the-conversion-calculator-has-no-currency-category)
|
|
479
|
+
- [`Invalid exchange rates`](#invalid-exchange-rates)
|
|
480
|
+
- [`The exchange rates could not be loaded`](#the-exchange-rates-could-not-be-loaded)
|
|
481
|
+
- [`The point of sale's Charge button stays off`](#the-point-of-sales-charge-button-stays-off)
|
|
482
|
+
- [`The Financial calculator shows no currency`](#the-financial-calculator-shows-no-currency)
|
|
483
|
+
|
|
469
484
|
**Barcodes**
|
|
470
485
|
|
|
471
486
|
- [`Code 128 holds ASCII only (0-127)`](#code-128-holds-ascii-only-0-127)
|
|
@@ -8073,6 +8088,125 @@ Before upgrading, precaching the illustration chunks in the service worker narro
|
|
|
8073
8088
|
|
|
8074
8089
|
---
|
|
8075
8090
|
|
|
8091
|
+
## Calculator
|
|
8092
|
+
|
|
8093
|
+
### `The calculator is unstyled`
|
|
8094
|
+
|
|
8095
|
+
The keypad is a column of plain buttons, the display has no tint and the keys
|
|
8096
|
+
have no shape.
|
|
8097
|
+
|
|
8098
|
+
**Why:** the calculator's stylesheet is opt-in. `styles.css` does not import it,
|
|
8099
|
+
so `Calculator` and `CalculatorField` render their markup without it.
|
|
8100
|
+
**Fix:** import it once, after `styles.css`: `@import "@nxgt/material/calculator.css";`
|
|
8101
|
+
(or `import '@nxgt/material/calculator.css'`).
|
|
8102
|
+
|
|
8103
|
+
### `This calculator could not be loaded.`
|
|
8104
|
+
|
|
8105
|
+
**When:** a variant other than Standard (Scientific, Point of sale, Financial, Conversion, Programmer) shows this message and a "Try again" button in place of its keys.
|
|
8106
|
+
**Why:** each of those variants is a separate chunk fetched the first time it is shown, and the fetch was rejected. Usual causes: a Content Security Policy that blocks same-origin chunks (`script-src` without `'self'` or `'strict-dynamic'` under a nonce, see the [CSP guide](guides/csp.md)); a bundler or CDN that does not serve the hashed chunk files next to the entry; a tab kept open across a deploy that removed the old hashed chunks; or a flaky network.
|
|
8107
|
+
**Fix:** press Try again. If it fails again, reload the page, because a browser may keep a failed dynamic import until the page reloads. Then check the Network tab for the chunk's URL (`*-variant-*.js`): a 404 means the deploy dropped it, a blocked request means the CSP. The message and button are the `material.calculator.load-failed` and `material.calculator.retry` strings.
|
|
8108
|
+
|
|
8109
|
+
### `The calculator does not remember its tape`
|
|
8110
|
+
|
|
8111
|
+
Not an error. The tape and memory are read from `localStorage` after mount, so
|
|
8112
|
+
the server and the first client frame show an empty tape. Nothing is kept when
|
|
8113
|
+
`persist={false}`, in a private window that blocks storage or when the storage
|
|
8114
|
+
is full; two calculators with the same `persist` key share one slot, so give
|
|
8115
|
+
each its own `key`.
|
|
8116
|
+
|
|
8117
|
+
```tsx
|
|
8118
|
+
<Calculator persist={{ key: 'till-2' }} />
|
|
8119
|
+
```
|
|
8120
|
+
|
|
8121
|
+
### `Apply stays disabled in the calculator field`
|
|
8122
|
+
|
|
8123
|
+
Not an error. `CalculatorField`'s Apply writes the display's number, so it is
|
|
8124
|
+
disabled while the display holds none: nothing typed yet, an unfinished entry
|
|
8125
|
+
such as `2 +` with nothing after it, or an error (a division by zero). Finish
|
|
8126
|
+
the sum or press `C` and enter a number; Cancel or Escape keeps the field's
|
|
8127
|
+
number.
|
|
8128
|
+
|
|
8129
|
+
### `A calculator key types nothing on the page`
|
|
8130
|
+
|
|
8131
|
+
The calculator takes the keys typed inside it. Pass `globalKeyboard` for the
|
|
8132
|
+
keys typed elsewhere on the page; a key typed in an input, a textarea, a
|
|
8133
|
+
select or an editable element is never taken.
|
|
8134
|
+
|
|
8135
|
+
```tsx
|
|
8136
|
+
<Calculator globalKeyboard />
|
|
8137
|
+
```
|
|
8138
|
+
|
|
8139
|
+
### `Copy or paste does nothing in the calculator`
|
|
8140
|
+
|
|
8141
|
+
The async clipboard needs a secure context (HTTPS or `localhost`), and reading
|
|
8142
|
+
it needs the user's permission. Without them the buttons leave the calculator
|
|
8143
|
+
as it was and nothing is announced. Copy is also left to the browser while text
|
|
8144
|
+
is selected.
|
|
8145
|
+
|
|
8146
|
+
### `The scientific calculator answers "Undefined result"`
|
|
8147
|
+
|
|
8148
|
+
The engine refuses what has no real value instead of showing a wrong number:
|
|
8149
|
+
`tan(90)` in degrees, `ln(0)`, `sqrt(-1)`, `asin(2)`, `(-8)^0.5` and a
|
|
8150
|
+
radian argument of more than 40 digits. The angle unit decides `sin(30)`:
|
|
8151
|
+
check the toolbar's DEG, RAD, GRAD before suspecting the result.
|
|
8152
|
+
|
|
8153
|
+
### `The calculator now shows a switcher`
|
|
8154
|
+
|
|
8155
|
+
`variants` defaults to every registered variant (Standard, Scientific, Cash
|
|
8156
|
+
register, Financial and Conversion), so a plain `<Calculator />` offers the switcher, and the list grows as
|
|
8157
|
+
variants are added. Pass the set you want (`variants={['standard']}` for the
|
|
8158
|
+
single Standard calculator).
|
|
8159
|
+
|
|
8160
|
+
### `The point of sale's Charge button stays off`
|
|
8161
|
+
|
|
8162
|
+
Charge is off while the ticket has no line, and while the **Tendered** amount is
|
|
8163
|
+
smaller than the total (the line under the bills says "... still due"). Type or
|
|
8164
|
+
pick a larger amount, or clear the tendered field with `C` to charge without
|
|
8165
|
+
cash. Amounts are in the currency's minor unit: with `currency="JPY"` the keys
|
|
8166
|
+
type whole yen, so `1250` is 1,250 and not 12.50.
|
|
8167
|
+
|
|
8168
|
+
### `The Financial calculator shows no currency`
|
|
8169
|
+
|
|
8170
|
+
Amounts carry no currency code and have two decimals until you pass `currency`
|
|
8171
|
+
(`<Calculator variants={['financial']} currency="USD" />`, an ISO 4217 code;
|
|
8172
|
+
the point of sale reads the same prop). The code also sets the decimals:
|
|
8173
|
+
`JPY` has none, `KWD` three. `locale` only changes the separators.
|
|
8174
|
+
|
|
8175
|
+
### `The conversion calculator has no Currency category`
|
|
8176
|
+
|
|
8177
|
+
The category exists only when `currencyRates` is given, as an object
|
|
8178
|
+
`{ base, rates, asOf? }` or a function returning that. Without it the variant
|
|
8179
|
+
offers the eight unit categories.
|
|
8180
|
+
|
|
8181
|
+
```tsx
|
|
8182
|
+
<Calculator defaultVariant="conversion" currencyRates={{ base: 'EUR', rates: { USD: '1.085' } }} />
|
|
8183
|
+
```
|
|
8184
|
+
|
|
8185
|
+
### `Invalid exchange rates`
|
|
8186
|
+
|
|
8187
|
+
Shown in the Conversion variant's Currency category. A rate is not a positive
|
|
8188
|
+
number, or the base is listed with a rate other than 1. Fix the payload the
|
|
8189
|
+
object or the function gives.
|
|
8190
|
+
|
|
8191
|
+
```tsx
|
|
8192
|
+
<Calculator defaultVariant="conversion" currencyRates={{ base: 'EUR', rates: { USD: '1.085', EUR: '1' } }} />
|
|
8193
|
+
```
|
|
8194
|
+
|
|
8195
|
+
### `The exchange rates could not be loaded`
|
|
8196
|
+
|
|
8197
|
+
Shown in the Currency category when the `currencyRates` function rejected or
|
|
8198
|
+
threw (offline, a 500). **Try again** calls it again. Pass the `signal` to your
|
|
8199
|
+
`fetch` so a closed panel cancels the request:
|
|
8200
|
+
|
|
8201
|
+
```tsx
|
|
8202
|
+
<Calculator
|
|
8203
|
+
defaultVariant="conversion"
|
|
8204
|
+
currencyRates={(signal) => fetch('/api/rates', { signal }).then((r) => r.json())}
|
|
8205
|
+
/>
|
|
8206
|
+
```
|
|
8207
|
+
|
|
8208
|
+
---
|
|
8209
|
+
|
|
8076
8210
|
## Barcodes
|
|
8077
8211
|
|
|
8078
8212
|
### `Code 128 holds ASCII only (0-127)`
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.form-grid-layout {
|
|
98
|
-
@apply relative flex flex-col
|
|
98
|
+
@apply relative flex flex-col @container;
|
|
99
99
|
[data-slot="form-fields"] {
|
|
100
100
|
@apply grid @2xl:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-2 bg-background/80 p-4 place-items-start;
|
|
101
101
|
|
|
@@ -152,10 +152,15 @@
|
|
|
152
152
|
@variant max-sm {
|
|
153
153
|
--form-actions-clearance-default: 8rem;
|
|
154
154
|
}
|
|
155
|
-
/*
|
|
156
|
-
|
|
155
|
+
/* The actions are one surface with the fields: same tint, no gap, so a
|
|
156
|
+
short form on a page is one slab, not two. Sticky at the bottom of
|
|
157
|
+
whatever scrolls the form (in reach, and only a long form scrolls);
|
|
158
|
+
the blur keeps the fields passing under it quiet. Padded for the
|
|
159
|
+
safe area (`viewport-fit=cover`: the home indicator). The 0.5rem above
|
|
160
|
+
the buttons is a transparent border, painted with the tint, so a
|
|
161
|
+
`*:p-0` on the form (the editor's edit forms) cannot make them flush. */
|
|
157
162
|
[data-slot="form-actions"] {
|
|
158
|
-
@apply sticky bottom-0 z-10 flex w-full justify-end gap-2 bg-background/
|
|
163
|
+
@apply sticky bottom-0 z-10 flex w-full justify-end gap-2 bg-background/80 border-t-8 border-transparent px-4 pb-[max(1rem,env(safe-area-inset-bottom))] backdrop-blur-sm max-sm:*:flex-1;
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
|
|
@@ -92,11 +92,18 @@
|
|
|
92
92
|
min-width: 2.75rem;
|
|
93
93
|
min-height: 2.75rem;
|
|
94
94
|
}
|
|
95
|
-
/* The
|
|
96
|
-
*
|
|
95
|
+
/* The label's 12px of room around the box is mostly taken back, but not
|
|
96
|
+
* all of it. Since the list draws no panel on a phone (#2295) the row
|
|
97
|
+
* starts 4px inside the page gutter, and a tap-target check
|
|
98
|
+
* (`@nxgt/playwright`'s `expectTapTargets`) moves the 44px square centred
|
|
99
|
+
* on the box back inside the viewport: with the box's centre under 22px
|
|
100
|
+
* from the screen's edge (20px in an 8px gutter at -0.875rem), the square
|
|
101
|
+
* reached past the box's `::after` (#2304). At -0.375rem the centre is
|
|
102
|
+
* 20px in from the gutter: 22px or more from the edge in any gutter of
|
|
103
|
+
* 2px or more. */
|
|
97
104
|
[data-slot="server-table-phone-row-start"]
|
|
98
105
|
[data-slot="select-checkbox-label"] {
|
|
99
|
-
margin-inline-start: -0.
|
|
106
|
+
margin-inline-start: -0.375rem;
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
[data-slot="server-table-phone-row"]
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* The width bands of the calculator itself, touch, motion and forced colours. */
|
|
2
|
+
/* Four or more variants do not fit one line under 480: two by two, as many rows as needed. */
|
|
3
|
+
@container nxgt-calc (max-width: 479.98px) {
|
|
4
|
+
.nxgt-calc .nxgt-calc-switcher {
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
7
|
+
border-radius: 1.5rem;
|
|
8
|
+
overflow: visible;
|
|
9
|
+
}
|
|
10
|
+
.nxgt-calc .nxgt-calc-switcher [role="tab"] {
|
|
11
|
+
min-width: 0;
|
|
12
|
+
}
|
|
13
|
+
/* The sliding indicator spans one row of a wrapped grid: each active tab draws its own surface instead. */
|
|
14
|
+
.nxgt-calc .nxgt-calc-switcher [data-slot="tabs-indicator"] {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
.nxgt-calc .nxgt-calc-switcher [role="tab"][data-state="active"]::after {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/* Compact: under 360 */
|
|
22
|
+
@container nxgt-calc (max-width: 359.98px) {
|
|
23
|
+
.nxgt-calc-body {
|
|
24
|
+
--calc-gap: 0.375rem;
|
|
25
|
+
--calc-key: 2.75rem;
|
|
26
|
+
--calc-radius: 1.5rem;
|
|
27
|
+
--calc-result: 2.25rem;
|
|
28
|
+
}
|
|
29
|
+
.nxgt-calc-key {
|
|
30
|
+
font-size: 1.125rem;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/* Tablet: 600 and up */
|
|
34
|
+
@container nxgt-calc (min-width: 600px) {
|
|
35
|
+
.nxgt-calc-body {
|
|
36
|
+
--calc-gap: 0.625rem;
|
|
37
|
+
--calc-key: 3.75rem;
|
|
38
|
+
--calc-result: 3.75rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/* Scientific: the functions beside the keys where there is room for them:
|
|
42
|
+
* 600-719, and 1000 and up once the tape takes its column. */
|
|
43
|
+
@container nxgt-calc ((min-width: 600px) and (max-width: 719.98px)) or (
|
|
44
|
+
min-width: 1000px
|
|
45
|
+
) {
|
|
46
|
+
.nxgt-calc[data-variant="scientific"] .nxgt-calc-keys {
|
|
47
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
48
|
+
align-items: start;
|
|
49
|
+
}
|
|
50
|
+
.nxgt-calc[data-variant="scientific"] .nxgt-calc-pane {
|
|
51
|
+
display: grid;
|
|
52
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
53
|
+
gap: var(--calc-gap);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/* On touch the beside layout needs 6 keys of 44px a pane: from 640px, and from
|
|
57
|
+
* 1040px with the tape; the bands under that stay stacked. */
|
|
58
|
+
@media (pointer: coarse) {
|
|
59
|
+
@container nxgt-calc ((min-width: 600px) and (max-width: 639.98px)) or (
|
|
60
|
+
(min-width: 1000px) and (max-width: 1039.98px)
|
|
61
|
+
) {
|
|
62
|
+
.nxgt-calc[data-variant="scientific"] .nxgt-calc-keys {
|
|
63
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
64
|
+
}
|
|
65
|
+
.nxgt-calc[data-variant="scientific"] .nxgt-calc-pane {
|
|
66
|
+
display: contents;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/* The tape beside the keypad: 720 and up */
|
|
71
|
+
@container nxgt-calc (min-width: 720px) {
|
|
72
|
+
.nxgt-calc-body {
|
|
73
|
+
grid-template-columns: minmax(0, 1fr) 18rem;
|
|
74
|
+
gap: 1.5rem;
|
|
75
|
+
}
|
|
76
|
+
.nxgt-calc-tape,
|
|
77
|
+
.nxgt-calc[data-tape-open] .nxgt-calc-tape {
|
|
78
|
+
position: static;
|
|
79
|
+
display: flex;
|
|
80
|
+
padding: 0;
|
|
81
|
+
background: none;
|
|
82
|
+
}
|
|
83
|
+
.nxgt-calc-tape-toggle {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
.nxgt-calc[data-tape-open] .nxgt-calc-keys {
|
|
87
|
+
display: grid;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/* Desktop: 900 and up */
|
|
91
|
+
@container nxgt-calc (min-width: 900px) {
|
|
92
|
+
.nxgt-calc-body {
|
|
93
|
+
--calc-key: 4rem;
|
|
94
|
+
--calc-result: 4.25rem;
|
|
95
|
+
grid-template-columns: minmax(0, 1fr) 22rem;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/* A short landscape phone: keys shrink so the keypad is not cut off */
|
|
99
|
+
@media (max-height: 480px) and (orientation: landscape) {
|
|
100
|
+
.nxgt-calc-body {
|
|
101
|
+
--calc-key: 2.5rem;
|
|
102
|
+
--calc-result: 2.25rem;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/* Touch: keys stay 44px and more */
|
|
106
|
+
@media (pointer: coarse) {
|
|
107
|
+
.nxgt-calc-key,
|
|
108
|
+
.nxgt-calc-key[data-role="memory"],
|
|
109
|
+
.nxgt-calc-key[data-role="bracket"] {
|
|
110
|
+
min-height: max(var(--calc-key), 2.75rem);
|
|
111
|
+
}
|
|
112
|
+
.nxgt-calc-switcher [role="tab"],
|
|
113
|
+
.nxgt-calc-segment-item,
|
|
114
|
+
.nxgt-calc-second,
|
|
115
|
+
.nxgt-calc-entry button,
|
|
116
|
+
.nxgt-calc-tool {
|
|
117
|
+
min-width: 2.75rem;
|
|
118
|
+
min-height: 2.75rem;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
@media (prefers-reduced-motion: reduce) {
|
|
122
|
+
.nxgt-calc-swap {
|
|
123
|
+
animation: none;
|
|
124
|
+
}
|
|
125
|
+
.nxgt-calc-key {
|
|
126
|
+
transition: none;
|
|
127
|
+
}
|
|
128
|
+
.nxgt-calc-key:active {
|
|
129
|
+
transform: none;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
@media (forced-colors: active) {
|
|
133
|
+
.nxgt-calc-segment-item[aria-pressed="true"] {
|
|
134
|
+
background: Highlight;
|
|
135
|
+
color: HighlightText;
|
|
136
|
+
}
|
|
137
|
+
.nxgt-calc-key,
|
|
138
|
+
.nxgt-calc-display,
|
|
139
|
+
.nxgt-calc-entry {
|
|
140
|
+
border: 1px solid ButtonText;
|
|
141
|
+
}
|
|
142
|
+
.nxgt-calc-key[data-role="equals"] {
|
|
143
|
+
background: Highlight;
|
|
144
|
+
color: HighlightText;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* The display: tools row, memory chip, expression and result. */
|
|
2
|
+
/* Display */
|
|
3
|
+
.nxgt-calc-display {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 0.25rem;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
padding: 0.5rem 1rem 1rem;
|
|
9
|
+
border-radius: var(--calc-radius);
|
|
10
|
+
}
|
|
11
|
+
.nxgt-calc-tools {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 0.25rem;
|
|
15
|
+
min-height: 2rem;
|
|
16
|
+
}
|
|
17
|
+
.nxgt-calc-memory {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
min-width: 1.75rem;
|
|
22
|
+
height: 1.75rem;
|
|
23
|
+
padding-inline: 0.5rem;
|
|
24
|
+
border-radius: 9999px;
|
|
25
|
+
font-size: 0.8125rem;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
}
|
|
28
|
+
.nxgt-calc-screen {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: flex-end;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
border-radius: 1rem;
|
|
34
|
+
text-align: right;
|
|
35
|
+
direction: ltr;
|
|
36
|
+
}
|
|
37
|
+
.nxgt-calc-screen:focus-visible {
|
|
38
|
+
outline: 2px solid var(--ring);
|
|
39
|
+
outline-offset: 2px;
|
|
40
|
+
}
|
|
41
|
+
.nxgt-calc-expression {
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
min-height: 1.5rem;
|
|
44
|
+
margin: 0;
|
|
45
|
+
overflow-x: auto;
|
|
46
|
+
overflow-wrap: anywhere;
|
|
47
|
+
color: var(--muted-foreground);
|
|
48
|
+
font-size: 1.125rem;
|
|
49
|
+
font-variant-numeric: tabular-nums;
|
|
50
|
+
}
|
|
51
|
+
.nxgt-calc-result {
|
|
52
|
+
display: block;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
font-size: var(--calc-result);
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
line-height: 1.1;
|
|
57
|
+
letter-spacing: -0.02em;
|
|
58
|
+
font-variant-numeric: tabular-nums;
|
|
59
|
+
overflow-wrap: anywhere;
|
|
60
|
+
}
|
|
61
|
+
.nxgt-calc-result[data-size="long"] {
|
|
62
|
+
font-size: calc(var(--calc-result) * 0.72);
|
|
63
|
+
}
|
|
64
|
+
.nxgt-calc-result[data-size="xlong"] {
|
|
65
|
+
font-size: calc(var(--calc-result) * 0.5);
|
|
66
|
+
}
|
|
67
|
+
.nxgt-calc-result[data-kind="preview"] {
|
|
68
|
+
color: var(--muted-foreground);
|
|
69
|
+
}
|
|
70
|
+
.nxgt-calc-result[data-kind="error"] {
|
|
71
|
+
color: var(--error-text);
|
|
72
|
+
font-size: 1.5rem;
|
|
73
|
+
}
|
|
74
|
+
.nxgt-calc-swap {
|
|
75
|
+
display: inline-block;
|
|
76
|
+
animation: nxgt-calc-swap 180ms ease-out;
|
|
77
|
+
}
|
|
78
|
+
@keyframes nxgt-calc-swap {
|
|
79
|
+
from {
|
|
80
|
+
opacity: 0;
|
|
81
|
+
transform: translateY(0.35em);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* The shaped keys by role, on a grid of twelve units. */
|
|
2
|
+
/* Keys */
|
|
3
|
+
.nxgt-calc-keys {
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
6
|
+
gap: var(--calc-gap);
|
|
7
|
+
direction: ltr;
|
|
8
|
+
}
|
|
9
|
+
.nxgt-calc-key {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
min-height: var(--calc-key);
|
|
15
|
+
border: 0;
|
|
16
|
+
border-radius: 1.75rem;
|
|
17
|
+
font: inherit;
|
|
18
|
+
font-size: 1.375rem;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
font-variant-numeric: tabular-nums;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
touch-action: manipulation;
|
|
23
|
+
user-select: none;
|
|
24
|
+
transition:
|
|
25
|
+
border-radius 120ms ease-out,
|
|
26
|
+
transform 120ms ease-out,
|
|
27
|
+
filter 120ms;
|
|
28
|
+
}
|
|
29
|
+
.nxgt-calc-key[data-span="2"] {
|
|
30
|
+
grid-column: span 2;
|
|
31
|
+
}
|
|
32
|
+
.nxgt-calc-key[data-span="3"] {
|
|
33
|
+
grid-column: span 3;
|
|
34
|
+
}
|
|
35
|
+
.nxgt-calc-key[data-span="6"] {
|
|
36
|
+
grid-column: span 6;
|
|
37
|
+
}
|
|
38
|
+
.nxgt-calc-key[data-role="operator"],
|
|
39
|
+
.nxgt-calc-key[data-role="equals"] {
|
|
40
|
+
border-radius: 9999px;
|
|
41
|
+
}
|
|
42
|
+
.nxgt-calc-key[data-role="utility"] {
|
|
43
|
+
border-radius: 1.125rem;
|
|
44
|
+
}
|
|
45
|
+
.nxgt-calc-key[data-role="function"] {
|
|
46
|
+
border-radius: 9999px;
|
|
47
|
+
font-size: 1rem;
|
|
48
|
+
}
|
|
49
|
+
.nxgt-calc-key[data-role="memory"],
|
|
50
|
+
.nxgt-calc-key[data-role="bracket"] {
|
|
51
|
+
min-height: 2.5rem;
|
|
52
|
+
border-radius: 9999px;
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
}
|
|
55
|
+
/* Scientific: the functions pane sits above the keys (display: contents joins
|
|
56
|
+
* the keypad's grid), 2nd and the toolbar above both. */
|
|
57
|
+
.nxgt-calc-pane {
|
|
58
|
+
display: contents;
|
|
59
|
+
}
|
|
60
|
+
.nxgt-calc-pane[data-pane="functions"] .nxgt-calc-key {
|
|
61
|
+
min-height: max(calc(var(--calc-key) * 0.8), 2.75rem);
|
|
62
|
+
font-size: 0.8125rem;
|
|
63
|
+
letter-spacing: -0.02em;
|
|
64
|
+
}
|
|
65
|
+
.nxgt-calc-toolbar {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
}
|
|
72
|
+
.nxgt-calc-segment {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
gap: 2px;
|
|
75
|
+
padding: 2px;
|
|
76
|
+
border-radius: 9999px;
|
|
77
|
+
background: var(--muted);
|
|
78
|
+
}
|
|
79
|
+
.nxgt-calc-segment-item {
|
|
80
|
+
min-width: 2.25rem;
|
|
81
|
+
min-height: 1.75rem;
|
|
82
|
+
padding-inline: 0.5rem;
|
|
83
|
+
border: 0;
|
|
84
|
+
border-radius: 9999px;
|
|
85
|
+
background: transparent;
|
|
86
|
+
color: var(--foreground);
|
|
87
|
+
font: inherit;
|
|
88
|
+
font-size: 0.75rem;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
touch-action: manipulation;
|
|
92
|
+
}
|
|
93
|
+
.nxgt-calc-segment-item[aria-pressed="true"] {
|
|
94
|
+
background: var(--primary);
|
|
95
|
+
color: var(--primary-foreground);
|
|
96
|
+
}
|
|
97
|
+
.nxgt-calc-segment-item:focus-visible,
|
|
98
|
+
.nxgt-calc-second:focus-visible {
|
|
99
|
+
outline: 2px solid var(--ring);
|
|
100
|
+
outline-offset: 2px;
|
|
101
|
+
}
|
|
102
|
+
.nxgt-calc-second {
|
|
103
|
+
min-height: 2rem;
|
|
104
|
+
border-radius: 9999px;
|
|
105
|
+
font-variant-numeric: tabular-nums;
|
|
106
|
+
}
|
|
107
|
+
.nxgt-calc-key:hover {
|
|
108
|
+
filter: brightness(0.96);
|
|
109
|
+
}
|
|
110
|
+
.nxgt-calc-key:active {
|
|
111
|
+
border-radius: 0.625rem;
|
|
112
|
+
transform: scale(0.95);
|
|
113
|
+
}
|
|
114
|
+
.nxgt-calc-key:focus-visible,
|
|
115
|
+
.nxgt-calc-entry button:focus-visible {
|
|
116
|
+
outline: 2px solid var(--ring);
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|