@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { i as e, n as t, s as n, t as r } from "./key-layout-cR79xfGE.js";
|
|
2
|
+
//#region lib/components/ui/widgets/calculator/variants/standard/standard-layout.ts
|
|
3
|
+
var i = {
|
|
4
|
+
columns: 12,
|
|
5
|
+
rows: [
|
|
6
|
+
r,
|
|
7
|
+
n([
|
|
8
|
+
e("clear", "C", "C", "utility", "clear", "Clear all"),
|
|
9
|
+
e("sign", "±", "±", "utility", "sign", "Change sign"),
|
|
10
|
+
e("percent", "%", "%", "utility", "percent", "Percent"),
|
|
11
|
+
e("divide", "/", "÷", "operator", "divide", "Divided by")
|
|
12
|
+
]),
|
|
13
|
+
n([
|
|
14
|
+
t(7),
|
|
15
|
+
t(8),
|
|
16
|
+
t(9),
|
|
17
|
+
e("multiply", "*", "×", "operator", "multiply", "Times")
|
|
18
|
+
]),
|
|
19
|
+
n([
|
|
20
|
+
t(4),
|
|
21
|
+
t(5),
|
|
22
|
+
t(6),
|
|
23
|
+
e("subtract", "-", "−", "operator", "subtract", "Minus")
|
|
24
|
+
]),
|
|
25
|
+
n([
|
|
26
|
+
t(1),
|
|
27
|
+
t(2),
|
|
28
|
+
t(3),
|
|
29
|
+
e("add", "+", "+", "operator", "add", "Plus")
|
|
30
|
+
]),
|
|
31
|
+
n([
|
|
32
|
+
t(0),
|
|
33
|
+
e("decimal", ".", ".", "digit", "decimal", "Decimal separator"),
|
|
34
|
+
e("backspace", "backspace", "⌫", "utility", "backspace", "Delete last character"),
|
|
35
|
+
e("equals", "=", "=", "equals", "equals", "Equals")
|
|
36
|
+
])
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as t };
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
+
import { n as t } from "./dist-DVRQkaTK.js";
|
|
3
|
+
import { i as n, r, t as i } from "./dist-DWZXlCZR.js";
|
|
4
|
+
import { a, i as o, r as s } from "./dist-DHdUUM1w.js";
|
|
5
|
+
import { i as c, n as l, r as u, t as d } from "./dist-DOK3zo5C.js";
|
|
6
|
+
import { t as f } from "./use-material-translation-CD6QoVal.js";
|
|
7
|
+
import * as p from "react";
|
|
8
|
+
import { createContext as m, useCallback as h, useContext as g, useEffect as ee, useLayoutEffect as _, useRef as v, useState as te } from "react";
|
|
9
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
|
+
import { ChevronLeft as ne, ChevronRight as re } from "lucide-react";
|
|
11
|
+
//#region ../../node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
12
|
+
var S = Object.defineProperty, C = (e, t) => S(e, "name", {
|
|
13
|
+
value: t,
|
|
14
|
+
configurable: !0
|
|
15
|
+
}), w = "Tabs", [ie, ae] = a(w, [u]), T = u(), [oe, E] = ie(w), D = /* @__PURE__ */ p.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
16
|
+
let { __scopeTabs: r, value: a, onValueChange: o, defaultValue: l, orientation: u = "horizontal", dir: d, activationMode: f = "automatic", ...p } = e, m = c(d), [h, g] = i({
|
|
17
|
+
prop: a,
|
|
18
|
+
onChange: o,
|
|
19
|
+
defaultProp: l ?? "",
|
|
20
|
+
caller: w
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ b(oe, {
|
|
23
|
+
scope: r,
|
|
24
|
+
baseId: s(),
|
|
25
|
+
value: h,
|
|
26
|
+
onValueChange: g,
|
|
27
|
+
orientation: u,
|
|
28
|
+
dir: m,
|
|
29
|
+
activationMode: f,
|
|
30
|
+
children: /* @__PURE__ */ b(n.div, {
|
|
31
|
+
dir: m,
|
|
32
|
+
"data-orientation": u,
|
|
33
|
+
...p,
|
|
34
|
+
ref: t
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}, "Tabs")), O = "TabsList", k = /* @__PURE__ */ p.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
38
|
+
let { __scopeTabs: r, loop: i = !0, ...a } = e, o = E(O, r);
|
|
39
|
+
return /* @__PURE__ */ b(l, {
|
|
40
|
+
asChild: !0,
|
|
41
|
+
...T(r),
|
|
42
|
+
orientation: o.orientation,
|
|
43
|
+
dir: o.dir,
|
|
44
|
+
loop: i,
|
|
45
|
+
children: /* @__PURE__ */ b(n.div, {
|
|
46
|
+
role: "tablist",
|
|
47
|
+
"aria-orientation": o.orientation,
|
|
48
|
+
...a,
|
|
49
|
+
ref: t
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}, "TabsList")), se = "TabsTrigger", ce = /* @__PURE__ */ p.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
53
|
+
let { __scopeTabs: i, value: a, disabled: o = !1, ...s } = e, c = E(se, i), l = T(i), u = A(c.baseId, a), f = j(c.baseId, a), p = a === c.value;
|
|
54
|
+
return /* @__PURE__ */ b(d, {
|
|
55
|
+
asChild: !0,
|
|
56
|
+
...l,
|
|
57
|
+
focusable: !o,
|
|
58
|
+
active: p,
|
|
59
|
+
children: /* @__PURE__ */ b(n.button, {
|
|
60
|
+
type: "button",
|
|
61
|
+
role: "tab",
|
|
62
|
+
"aria-selected": p,
|
|
63
|
+
"aria-controls": f,
|
|
64
|
+
"data-state": p ? "active" : "inactive",
|
|
65
|
+
"data-disabled": o ? "" : void 0,
|
|
66
|
+
disabled: o,
|
|
67
|
+
id: u,
|
|
68
|
+
...s,
|
|
69
|
+
ref: t,
|
|
70
|
+
onMouseDown: r(e.onMouseDown, (e) => {
|
|
71
|
+
!o && e.button === 0 && e.ctrlKey === !1 ? c.onValueChange(a) : e.preventDefault();
|
|
72
|
+
}),
|
|
73
|
+
onKeyDown: r(e.onKeyDown, (e) => {
|
|
74
|
+
o || e.target !== e.currentTarget || [" ", "Enter"].includes(e.key) && c.onValueChange(a);
|
|
75
|
+
}),
|
|
76
|
+
onFocus: r(e.onFocus, () => {
|
|
77
|
+
let e = c.activationMode !== "manual";
|
|
78
|
+
!p && !o && e && c.onValueChange(a);
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}, "TabsTrigger")), le = "TabsContent", ue = /* @__PURE__ */ p.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
83
|
+
let { __scopeTabs: r, value: i, forceMount: a, children: s, ...c } = e, l = E(le, r), u = A(l.baseId, i), d = j(l.baseId, i), f = i === l.value, m = p.useRef(f);
|
|
84
|
+
return p.useEffect(() => {
|
|
85
|
+
let e = requestAnimationFrame(() => m.current = !1);
|
|
86
|
+
return () => cancelAnimationFrame(e);
|
|
87
|
+
}, []), /* @__PURE__ */ b(o, {
|
|
88
|
+
present: a || f,
|
|
89
|
+
children: ({ present: r }) => /* @__PURE__ */ b(n.div, {
|
|
90
|
+
"data-state": f ? "active" : "inactive",
|
|
91
|
+
"data-orientation": l.orientation,
|
|
92
|
+
role: "tabpanel",
|
|
93
|
+
"aria-labelledby": u,
|
|
94
|
+
hidden: !r,
|
|
95
|
+
id: d,
|
|
96
|
+
tabIndex: 0,
|
|
97
|
+
...c,
|
|
98
|
+
ref: t,
|
|
99
|
+
style: {
|
|
100
|
+
...e.style,
|
|
101
|
+
animationDuration: m.current ? "0s" : void 0
|
|
102
|
+
},
|
|
103
|
+
children: r && s
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}, "TabsContent"));
|
|
107
|
+
function A(e, t) {
|
|
108
|
+
return `${e}-trigger-${t}`;
|
|
109
|
+
}
|
|
110
|
+
C(A, "makeTriggerId");
|
|
111
|
+
function j(e, t) {
|
|
112
|
+
return `${e}-content-${t}`;
|
|
113
|
+
}
|
|
114
|
+
C(j, "makeContentId");
|
|
115
|
+
var de = D, fe = k, pe = ce, me = ue;
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region lib/components/ui/primitives/tabs/tabs-classes.ts
|
|
118
|
+
function M(e) {
|
|
119
|
+
return e === "segmented" || e === "line" ? "segmented" : "underline";
|
|
120
|
+
}
|
|
121
|
+
var N = "aria-[orientation=vertical]:flex-col", he = {
|
|
122
|
+
underline: "flex min-w-0 flex-col gap-2 items-stretch data-[orientation=vertical]:flex-row",
|
|
123
|
+
segmented: "flex min-w-0 flex-col gap-2 items-start data-[orientation=vertical]:flex-row"
|
|
124
|
+
}, P = {
|
|
125
|
+
underline: `group/tabs-list relative flex gap-1 border-b border-border overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden ${N} aria-[orientation=vertical]:border-b-0 aria-[orientation=vertical]:border-l aria-[orientation=vertical]:overflow-x-visible aria-[orientation=vertical]:overflow-y-auto`,
|
|
126
|
+
segmented: `group/tabs-list relative inline-flex max-w-full rounded-full bg-muted p-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden ${N} aria-[orientation=vertical]:rounded-3xl aria-[orientation=vertical]:overflow-x-visible aria-[orientation=vertical]:overflow-y-auto`
|
|
127
|
+
}, F = "relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center gap-2 whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary dark:focus-visible:outline-track-fill", I = "group-data-[indicator=ready]/tabs-list:after:hidden", L = {
|
|
128
|
+
underline: `${F} h-10 px-4 rounded-t-md hover:bg-primary/5 data-[state=inactive]:hover:text-foreground data-[state=active]:text-primary-text data-[orientation=vertical]:justify-start data-[orientation=vertical]:rounded-t-none data-[orientation=vertical]:rounded-r-md after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full data-[state=active]:after:bg-primary dark:data-[state=active]:after:bg-track-fill data-[orientation=vertical]:after:inset-x-auto data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:h-auto data-[orientation=vertical]:after:w-0.5 ${I}`,
|
|
129
|
+
segmented: `${F} z-10 h-8 px-4 rounded-full data-[state=inactive]:hover:text-foreground data-[state=active]:text-foreground data-[state=active]:font-semibold after:pointer-events-none after:absolute after:inset-0 after:-z-10 after:rounded-full data-[state=active]:after:bg-background data-[state=active]:after:shadow-sm data-[state=active]:after:border data-[state=active]:after:border-muted-foreground dark:data-[state=active]:after:bg-card ${I}`
|
|
130
|
+
}, R = "pointer-events-none absolute left-0 invisible group-data-[indicator=ready]/tabs-list:visible group-data-[indicator=ready]/tabs-list:motion-safe:transition-[translate,width,height] duration-300 ease-out", ge = {
|
|
131
|
+
underline: `${R} bottom-0 h-0.5 rounded-full bg-primary dark:bg-track-fill w-(--tabs-indicator-w) translate-x-(--tabs-indicator-x) group-aria-[orientation=vertical]/tabs-list:bottom-auto group-aria-[orientation=vertical]/tabs-list:top-0 group-aria-[orientation=vertical]/tabs-list:w-0.5 group-aria-[orientation=vertical]/tabs-list:h-(--tabs-indicator-w) group-aria-[orientation=vertical]/tabs-list:translate-x-0 group-aria-[orientation=vertical]/tabs-list:translate-y-(--tabs-indicator-x)`,
|
|
132
|
+
segmented: `${R} inset-y-1 rounded-full bg-background shadow-sm border border-muted-foreground dark:bg-card w-(--tabs-indicator-w) translate-x-(--tabs-indicator-x) group-aria-[orientation=vertical]/tabs-list:inset-y-auto group-aria-[orientation=vertical]/tabs-list:inset-x-1 group-aria-[orientation=vertical]/tabs-list:top-0 group-aria-[orientation=vertical]/tabs-list:w-auto group-aria-[orientation=vertical]/tabs-list:h-(--tabs-indicator-w) group-aria-[orientation=vertical]/tabs-list:translate-x-0 group-aria-[orientation=vertical]/tabs-list:translate-y-(--tabs-indicator-x)`
|
|
133
|
+
}, _e = "inline-flex items-center gap-2", ve = "flex justify-center", ye = "w-full flex-1 outline-none";
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region lib/components/ui/primitives/tabs/partials/tabs-content.tsx
|
|
136
|
+
function be({ className: t, ...n }) {
|
|
137
|
+
return /* @__PURE__ */ b(me, {
|
|
138
|
+
"data-slot": "tabs-content",
|
|
139
|
+
className: e(ye, t),
|
|
140
|
+
...n
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region lib/components/ui/primitives/tabs/tabs-overflow-classes.ts
|
|
145
|
+
var z = "[--tabs-cue:2rem] pointer-coarse:[--tabs-cue:3rem] data-[overflow-left]:[--tabs-inset-left:var(--tabs-cue)] data-[overflow-left]:[--tabs-fade-left:calc(var(--tabs-cue)_+_1rem)] data-[overflow-right]:[--tabs-inset-right:var(--tabs-cue)] data-[overflow-right]:[--tabs-fade-right:calc(var(--tabs-cue)_+_1rem)] data-[overflow-left]:[mask-image:linear-gradient(to_right,transparent_var(--tabs-inset-left,0px),#000_var(--tabs-fade-left,0px),#000_calc(100%_-_var(--tabs-fade-right,0px)),transparent_calc(100%_-_var(--tabs-inset-right,0px)))] data-[overflow-right]:[mask-image:linear-gradient(to_right,transparent_var(--tabs-inset-left,0px),#000_var(--tabs-fade-left,0px),#000_calc(100%_-_var(--tabs-fade-right,0px)),transparent_calc(100%_-_var(--tabs-inset-right,0px)))]", xe = "pointer-events-none absolute z-20 overflow-hidden", B = "pointer-events-auto absolute top-1/2 inline-flex size-7 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-muted pointer-coarse:h-full pointer-coarse:max-h-11 pointer-coarse:w-11 focus-visible:outline-2 focus-visible:outline-offset-[-3px] focus-visible:outline-primary dark:focus-visible:outline-track-fill [&_svg]:size-4", Se = `${B} left-1`, Ce = `${B} right-1`, V = m("underline");
|
|
146
|
+
function H() {
|
|
147
|
+
return g(V);
|
|
148
|
+
}
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region lib/components/ui/primitives/tabs/tabs-selectors.ts
|
|
151
|
+
var U = "[role=\"tab\"], [data-slot=\"tabs-trigger\"]", W = "[role=\"tab\"][data-state=\"active\"], [data-slot=\"tabs-trigger\"][data-state=\"active\"]", G = 64, K = {
|
|
152
|
+
left: !1,
|
|
153
|
+
right: !1,
|
|
154
|
+
top: 0,
|
|
155
|
+
x: 0,
|
|
156
|
+
width: 0,
|
|
157
|
+
height: 0
|
|
158
|
+
};
|
|
159
|
+
function q() {
|
|
160
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "instant" : "smooth";
|
|
161
|
+
}
|
|
162
|
+
function J(e) {
|
|
163
|
+
if (e.getAttribute("aria-orientation") === "vertical") return K;
|
|
164
|
+
let t = e.scrollWidth - e.clientWidth;
|
|
165
|
+
if (t <= 1) return K;
|
|
166
|
+
let n = Math.abs(e.scrollLeft), r = n > 1, i = t - n > 1, a = getComputedStyle(e).direction === "rtl";
|
|
167
|
+
return {
|
|
168
|
+
left: a ? i : r,
|
|
169
|
+
right: a ? r : i,
|
|
170
|
+
top: e.offsetTop,
|
|
171
|
+
x: e.offsetLeft,
|
|
172
|
+
width: e.offsetWidth,
|
|
173
|
+
height: e.offsetHeight
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
var Y = (e, t) => e.left === t.left && e.right === t.right && e.top === t.top && e.x === t.x && e.width === t.width && e.height === t.height;
|
|
177
|
+
function X(e, t, n = q()) {
|
|
178
|
+
if (e.scrollWidth <= e.clientWidth) return;
|
|
179
|
+
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = 0;
|
|
180
|
+
i.left < r.left + G ? a = i.left - r.left - G : i.right > r.right - G && (a = i.right - r.right + G), a && e.scrollBy({
|
|
181
|
+
left: a,
|
|
182
|
+
behavior: n
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function Z(e, t = {
|
|
186
|
+
tab: U,
|
|
187
|
+
active: W
|
|
188
|
+
}) {
|
|
189
|
+
let [n, r] = te(K);
|
|
190
|
+
return _(() => {
|
|
191
|
+
let n = e.current;
|
|
192
|
+
if (!n) return;
|
|
193
|
+
let i = 0, a = () => {
|
|
194
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(() => {
|
|
195
|
+
let e = J(n);
|
|
196
|
+
r((t) => Y(t, e) ? t : e);
|
|
197
|
+
});
|
|
198
|
+
}, o = () => n.querySelector(t.active), s = new ResizeObserver(a), c = () => {
|
|
199
|
+
s.disconnect(), s.observe(n);
|
|
200
|
+
for (let e of n.querySelectorAll(t.tab)) s.observe(e);
|
|
201
|
+
}, l = new MutationObserver((e) => {
|
|
202
|
+
if (c(), a(), e.some((e) => e.type === "attributes")) {
|
|
203
|
+
let e = o();
|
|
204
|
+
e && X(n, e);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
l.observe(n, {
|
|
208
|
+
subtree: !0,
|
|
209
|
+
childList: !0,
|
|
210
|
+
attributeFilter: ["data-state"]
|
|
211
|
+
});
|
|
212
|
+
let u = (e) => {
|
|
213
|
+
e.target instanceof HTMLElement && e.target.matches(t.tab) && X(n, e.target);
|
|
214
|
+
};
|
|
215
|
+
n.addEventListener("focusin", u), c();
|
|
216
|
+
let d = o();
|
|
217
|
+
return d && X(n, d, "instant"), r(J(n)), () => {
|
|
218
|
+
cancelAnimationFrame(i), s.disconnect(), l.disconnect(), n.removeEventListener("focusin", u);
|
|
219
|
+
};
|
|
220
|
+
}, [
|
|
221
|
+
e,
|
|
222
|
+
t.tab,
|
|
223
|
+
t.active
|
|
224
|
+
]), we(e, n.left || n.right, r), n;
|
|
225
|
+
}
|
|
226
|
+
function we(e, t, n) {
|
|
227
|
+
ee(() => {
|
|
228
|
+
let r = e.current;
|
|
229
|
+
if (!r || !t) return;
|
|
230
|
+
let i = 0, a = () => {
|
|
231
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(() => {
|
|
232
|
+
let e = J(r);
|
|
233
|
+
n((t) => Y(t, e) ? t : e);
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
return document.addEventListener("scroll", a, {
|
|
237
|
+
passive: !0,
|
|
238
|
+
capture: !0
|
|
239
|
+
}), () => {
|
|
240
|
+
cancelAnimationFrame(i), document.removeEventListener("scroll", a, { capture: !0 });
|
|
241
|
+
};
|
|
242
|
+
}, [
|
|
243
|
+
e,
|
|
244
|
+
t,
|
|
245
|
+
n
|
|
246
|
+
]);
|
|
247
|
+
}
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region lib/components/ui/primitives/tabs/partials/tabs-indicator.tsx
|
|
250
|
+
function Q({ look: t }) {
|
|
251
|
+
let n = v(null);
|
|
252
|
+
return _(() => {
|
|
253
|
+
let e = n.current, t = e?.parentElement;
|
|
254
|
+
if (!e || !t) return;
|
|
255
|
+
let r = 0, i = () => {
|
|
256
|
+
cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
257
|
+
let n = t.querySelector(W);
|
|
258
|
+
if (!n) return;
|
|
259
|
+
let r = t.getAttribute("aria-orientation") === "vertical", i = r ? n.offsetHeight : n.offsetWidth, a = r ? n.offsetTop : n.offsetLeft;
|
|
260
|
+
e.style.setProperty("--tabs-indicator-w", `${i}px`), e.style.setProperty("--tabs-indicator-x", `${a}px`), t.dataset.indicator !== "ready" && (e.offsetWidth, t.dataset.indicator = "ready");
|
|
261
|
+
});
|
|
262
|
+
}, a = new ResizeObserver(i), o = () => {
|
|
263
|
+
a.disconnect(), a.observe(t);
|
|
264
|
+
for (let e of t.querySelectorAll(U)) a.observe(e);
|
|
265
|
+
}, s = new MutationObserver(() => {
|
|
266
|
+
o(), i();
|
|
267
|
+
});
|
|
268
|
+
s.observe(t, {
|
|
269
|
+
subtree: !0,
|
|
270
|
+
childList: !0,
|
|
271
|
+
attributeFilter: ["data-state", "aria-orientation"]
|
|
272
|
+
});
|
|
273
|
+
let c = t.closest("[dir]");
|
|
274
|
+
return c && s.observe(c, { attributeFilter: ["dir"] }), o(), i(), () => {
|
|
275
|
+
cancelAnimationFrame(r), a.disconnect(), s.disconnect();
|
|
276
|
+
};
|
|
277
|
+
}, []), /* @__PURE__ */ b("span", {
|
|
278
|
+
ref: n,
|
|
279
|
+
"aria-hidden": !0,
|
|
280
|
+
"data-slot": "tabs-indicator",
|
|
281
|
+
className: e(ge[t])
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region lib/components/ui/primitives/tabs/partials/tabs-scroll-buttons.tsx
|
|
286
|
+
function $({ list: e, overflow: t }) {
|
|
287
|
+
let { t: n } = f();
|
|
288
|
+
if (!t.left && !t.right) return null;
|
|
289
|
+
let r = (t) => {
|
|
290
|
+
let n = e.current;
|
|
291
|
+
if (!n) return;
|
|
292
|
+
let r = Math.max(96, n.clientWidth * .75);
|
|
293
|
+
n.scrollBy({
|
|
294
|
+
left: t * r,
|
|
295
|
+
behavior: q()
|
|
296
|
+
});
|
|
297
|
+
}, i = {
|
|
298
|
+
type: "button",
|
|
299
|
+
tabIndex: -1,
|
|
300
|
+
onMouseDown: (e) => e.preventDefault()
|
|
301
|
+
};
|
|
302
|
+
return /* @__PURE__ */ x("div", {
|
|
303
|
+
"data-slot": "tabs-scroll",
|
|
304
|
+
className: xe,
|
|
305
|
+
style: {
|
|
306
|
+
top: t.top,
|
|
307
|
+
left: t.x,
|
|
308
|
+
width: t.width,
|
|
309
|
+
height: t.height
|
|
310
|
+
},
|
|
311
|
+
children: [t.left && /* @__PURE__ */ b("button", {
|
|
312
|
+
...i,
|
|
313
|
+
"data-slot": "tabs-scroll-left",
|
|
314
|
+
"aria-label": n("material.tabs.scroll-left", "Scroll tabs left"),
|
|
315
|
+
className: Se,
|
|
316
|
+
onClick: () => r(-1),
|
|
317
|
+
children: /* @__PURE__ */ b(ne, { "aria-hidden": !0 })
|
|
318
|
+
}), t.right && /* @__PURE__ */ b("button", {
|
|
319
|
+
...i,
|
|
320
|
+
"data-slot": "tabs-scroll-right",
|
|
321
|
+
"aria-label": n("material.tabs.scroll-right", "Scroll tabs right"),
|
|
322
|
+
className: Ce,
|
|
323
|
+
onClick: () => r(1),
|
|
324
|
+
children: /* @__PURE__ */ b(re, { "aria-hidden": !0 })
|
|
325
|
+
})]
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region lib/components/ui/primitives/tabs/partials/tabs-list.tsx
|
|
330
|
+
function Te({ className: n, children: r, ref: i, ...a }) {
|
|
331
|
+
let o = H(), s = v(null), c = Z(s);
|
|
332
|
+
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x(fe, {
|
|
333
|
+
ref: h((e) => {
|
|
334
|
+
s.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
335
|
+
}, [i]),
|
|
336
|
+
"data-slot": "tabs-list",
|
|
337
|
+
"data-pw": "tabs-list",
|
|
338
|
+
"data-overflow-left": c.left ? "" : void 0,
|
|
339
|
+
"data-overflow-right": c.right ? "" : void 0,
|
|
340
|
+
className: e(P[o], z, n),
|
|
341
|
+
...a,
|
|
342
|
+
children: [/* @__PURE__ */ b(t, { children: r }), /* @__PURE__ */ b(Q, { look: o })]
|
|
343
|
+
}), /* @__PURE__ */ b($, {
|
|
344
|
+
list: s,
|
|
345
|
+
overflow: c
|
|
346
|
+
})] });
|
|
347
|
+
}
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region lib/components/ui/primitives/tabs/partials/tabs-trigger.tsx
|
|
350
|
+
function Ee({ className: n, children: r, icon: i, ...a }) {
|
|
351
|
+
return /* @__PURE__ */ x(pe, {
|
|
352
|
+
"data-slot": "tabs-trigger",
|
|
353
|
+
className: e(L[H()], n),
|
|
354
|
+
...a,
|
|
355
|
+
children: [i && /* @__PURE__ */ b("span", {
|
|
356
|
+
"data-slot": "tabs-trigger-icon",
|
|
357
|
+
className: "flex justify-center",
|
|
358
|
+
children: i
|
|
359
|
+
}), /* @__PURE__ */ b(t, {
|
|
360
|
+
child: r,
|
|
361
|
+
children: (e) => e && /* @__PURE__ */ b("span", {
|
|
362
|
+
className: "inline-flex items-center gap-2",
|
|
363
|
+
children: e
|
|
364
|
+
})
|
|
365
|
+
})]
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region lib/components/ui/primitives/tabs/tabs.tsx
|
|
370
|
+
function De({ className: t, variant: n = "underline", ...r }) {
|
|
371
|
+
let i = M(n);
|
|
372
|
+
return /* @__PURE__ */ b(V.Provider, {
|
|
373
|
+
value: i,
|
|
374
|
+
children: /* @__PURE__ */ b(de, {
|
|
375
|
+
"data-slot": "tabs",
|
|
376
|
+
"data-variant": n,
|
|
377
|
+
className: e(he[i], t),
|
|
378
|
+
...r
|
|
379
|
+
})
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
export { Q as a, H as c, ve as d, _e as f, M as h, $ as i, z as l, L as m, Ee as n, Z as o, P as p, Te as r, V as s, De as t, be as u };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { a as t, i as n, n as r } from "./field-blur-context-
|
|
3
|
-
import { t as i } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { describedBy as u } from "@nxgt/material-core/described-by";
|
|
2
|
+
import { a as t, i as n, n as r } from "./field-blur-context-BLGgf_3z.js";
|
|
3
|
+
import { t as i } from "./input-CC2joTjB.js";
|
|
4
|
+
import { isValidElement as a, useId as o } from "react";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
import { describedBy as l } from "@nxgt/material-core/described-by";
|
|
8
7
|
//#region lib/components/ui/fields/text-field/text-field.tsx
|
|
9
|
-
function
|
|
10
|
-
let v = r(), y =
|
|
8
|
+
function u({ error: u, helperText: f, label: p, className: m, leading: h, trailing: g, ..._ }) {
|
|
9
|
+
let v = r(), y = o(), b = o(), x = l(_["aria-describedby"], !!f && b), S = !!h && !a(h), C = !!g && !a(g), w = /* @__PURE__ */ c("div", {
|
|
11
10
|
className: e("relative", {
|
|
12
11
|
"*:first:size-8 *:first:absolute *:first:top-[calc(50%-16px)] *:first:left-1.5 [&_input]:pl-10 *:first:bg-muted/80 *:first:text-muted-foreground": !!h && !S,
|
|
13
12
|
"*:last:size-8 *:last:absolute *:last:top-[calc(50%-16px)] *:last:right-1.5 *:last:pointer-coarse:size-11 *:last:pointer-coarse:top-[calc(50%-22px)] *:last:pointer-coarse:right-0 [&_input]:pr-.5 *:last:bg-muted/80 *:last:text-muted-foreground": !!g && !C,
|
|
@@ -15,59 +14,46 @@ function d({ error: i, helperText: d, label: p, className: m, leading: h, traili
|
|
|
15
14
|
"[&_input]:pe-16": C
|
|
16
15
|
}),
|
|
17
16
|
children: [
|
|
18
|
-
S ? /* @__PURE__ */
|
|
17
|
+
S ? /* @__PURE__ */ s(d, {
|
|
19
18
|
slot: "leading",
|
|
20
19
|
children: h
|
|
21
20
|
}) : h && h,
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
"aria-invalid":
|
|
21
|
+
/* @__PURE__ */ s(i, {
|
|
22
|
+
"aria-invalid": u,
|
|
24
23
|
..._,
|
|
25
24
|
id: _.id ?? y,
|
|
26
25
|
"aria-describedby": x
|
|
27
26
|
}),
|
|
28
|
-
C ? /* @__PURE__ */
|
|
27
|
+
C ? /* @__PURE__ */ s(d, {
|
|
29
28
|
slot: "trailing",
|
|
30
29
|
children: g
|
|
31
30
|
}) : g && g
|
|
32
31
|
]
|
|
33
32
|
});
|
|
34
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ c("div", {
|
|
35
34
|
ref: v,
|
|
36
35
|
"data-slot": "text-field",
|
|
37
36
|
className: e("grid w-full content-start gap-1.5", m),
|
|
38
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ s(n, {
|
|
39
38
|
withAsterisk: _.required,
|
|
40
39
|
htmlFor: _.id ?? y,
|
|
41
40
|
children: p
|
|
42
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ c("div", {
|
|
43
42
|
className: "flex flex-col gap-0.5",
|
|
44
|
-
children: [w,
|
|
43
|
+
children: [w, f ? /* @__PURE__ */ s(t, {
|
|
45
44
|
id: b,
|
|
46
|
-
error:
|
|
47
|
-
children:
|
|
45
|
+
error: u,
|
|
46
|
+
children: f
|
|
48
47
|
}) : null]
|
|
49
48
|
})]
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
51
|
+
function d({ slot: t, children: n }) {
|
|
52
|
+
return /* @__PURE__ */ s("span", {
|
|
54
53
|
"data-slot": `text-field-${t}`,
|
|
55
54
|
className: e("absolute inset-y-1 flex min-w-9 items-center justify-center rounded-field-inner bg-muted/80 px-2 text-sm whitespace-nowrap text-muted-foreground", t === "leading" ? "start-1" : "end-1"),
|
|
56
55
|
children: n
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
//#endregion
|
|
60
|
-
|
|
61
|
-
function p({ children: t, className: n, ...r }) {
|
|
62
|
-
let a = !!(r["aria-label"] || r["aria-labelledby"]);
|
|
63
|
-
return /* @__PURE__ */ c(i, {
|
|
64
|
-
"aria-hidden": a ? void 0 : "true",
|
|
65
|
-
role: a ? "img" : void 0,
|
|
66
|
-
...r,
|
|
67
|
-
asChild: !0,
|
|
68
|
-
className: e("cursor-default", n),
|
|
69
|
-
children: /* @__PURE__ */ c("span", { children: t })
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
export { d as n, p as t };
|
|
59
|
+
export { u as t };
|
package/dist/theme-picker.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./bubble-input-
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./bubble-input-CQwVSoU3.js";
|
|
3
3
|
import { a as s, r as c } from "./icon-sprites-CaYXzOL4.js";
|
|
4
|
-
import { t as l } from "./use-material-translation-
|
|
4
|
+
import { t as l } from "./use-material-translation-CD6QoVal.js";
|
|
5
5
|
import { t as u } from "./use-theme-BCLireTd.js";
|
|
6
6
|
import { a as d, r as f } from "./theme-context-Cofk6vgs.js";
|
|
7
|
-
import { t as p } from "./theme-toggle-
|
|
7
|
+
import { t as p } from "./theme-toggle-C_VeiiCm.js";
|
|
8
8
|
import { n as m, t as h } from "./nxgt-theme-DA1IQe0O.js";
|
|
9
9
|
import { useContext as g } from "react";
|
|
10
10
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./use-material-translation-
|
|
1
|
+
import { t as e } from "./use-material-translation-CD6QoVal.js";
|
|
2
2
|
import { i as t } from "./theme-store-BdPp43cV.js";
|
|
3
3
|
import { n, t as r } from "./use-theme-BCLireTd.js";
|
|
4
4
|
import { r as i } from "./theme-context-Cofk6vgs.js";
|
|
5
|
-
import { n as a, t as o } from "./toggle-group-
|
|
5
|
+
import { n as a, t as o } from "./toggle-group-CVMxEpWi.js";
|
|
6
6
|
import { useContext as s, useEffect as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
import { Monitor as d, Moon as f, Sun as p } from "lucide-react";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
+
import { t } from "./dist-CxhKjOYm.js";
|
|
3
|
+
import { t as n } from "./dist-DkQbkF9T.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/components/ui/primitives/toggle/toggle.tsx
|
|
6
|
+
var i = n([
|
|
7
|
+
"inline-flex center gap-2 rounded text-sm font-medium hover:bg-primary/10 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-all aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error whitespace-nowrap",
|
|
8
|
+
"aria-pressed:bg-primary/12 aria-pressed:text-primary-text aria-pressed:border-primary-text aria-pressed:focus-visible:border-ring aria-pressed:shadow-[inset_0_-2px_0_0_var(--primary-text)] aria-pressed:hover:bg-primary/20 aria-pressed:hover:text-primary-text dark:aria-pressed:bg-primary/35 dark:aria-pressed:hover:bg-primary/50",
|
|
9
|
+
"aria-checked:bg-primary/12 aria-checked:text-primary-text aria-checked:border-primary-text aria-checked:focus-visible:border-ring aria-checked:shadow-[inset_0_-2px_0_0_var(--primary-text)] aria-checked:hover:bg-primary/20 aria-checked:hover:text-primary-text dark:aria-checked:bg-primary/35 dark:aria-checked:hover:bg-primary/50"
|
|
10
|
+
], {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-transparent",
|
|
14
|
+
outlined: "border border-primary/60 bg-transparent shadow-xs hover:bg-primary/20"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "h-9 px-2 min-w-9",
|
|
18
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
19
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function a({ className: n, variant: a, size: o, ...s }) {
|
|
28
|
+
return /* @__PURE__ */ r(t, {
|
|
29
|
+
"data-slot": "toggle",
|
|
30
|
+
"data-pw": s.name ?? "toggle",
|
|
31
|
+
className: e(i({
|
|
32
|
+
variant: a,
|
|
33
|
+
size: o,
|
|
34
|
+
className: n
|
|
35
|
+
})),
|
|
36
|
+
...s
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as n, a as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { n as t } from "./dist-DVRQkaTK.js";
|
|
3
|
-
import {
|
|
3
|
+
import { i as n, n as r, t as i } from "./dist-BZe2evxL.js";
|
|
4
4
|
import { t as a } from "./has-text-content-Ds2dkHX_.js";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { Check as c } from "lucide-react";
|