@lerianstudio/sindarian-ui 2.0.0-beta.25 → 2.0.0-beta.27
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/dist/charts/chart.js +4 -231
- package/dist/charts/index.js +1 -11
- package/dist/components/breadcrumb/get-breadcrumb-paths.js +1 -18
- package/dist/components/breadcrumb/index.js +1 -37
- package/dist/components/card/account-card/index.js +1 -69
- package/dist/components/card/basic-card/index.js +1 -20
- package/dist/components/card/dashboard-card/index.js +1 -20
- package/dist/components/card/entity-card/index.js +1 -68
- package/dist/components/card/index.js +1 -20
- package/dist/components/dialog/confirmation-dialog/index.js +1 -96
- package/dist/components/dialog/confirmation-dialog/use-confirm-dialog.js +1 -55
- package/dist/components/dialog/index.js +1 -19
- package/dist/components/dialog/large-dialog/index.js +1 -21
- package/dist/components/entity-box/index.js +1 -67
- package/dist/components/entity-data-table/index.js +1 -20
- package/dist/components/form/combo-box-field/index.js +1 -35
- package/dist/components/form/country-field/index.js +1 -11
- package/dist/components/form/date-picker-field/index.js +1 -83
- package/dist/components/form/date-range-field/index.js +1 -58
- package/dist/components/form/date-time-picker-field/index.js +1 -114
- package/dist/components/form/file-upload-field/index.js +1 -69
- package/dist/components/form/index.js +1 -31
- package/dist/components/form/input-field/index.js +1 -96
- package/dist/components/form/otp-field/index.js +1 -19
- package/dist/components/form/pagination-limit-field/index.js +1 -10
- package/dist/components/form/password-field/index.js +1 -16
- package/dist/components/form/radio-group-field/index.js +1 -36
- package/dist/components/form/renderable-label.js +1 -57
- package/dist/components/form/select-field/index.js +1 -68
- package/dist/components/form/state-field/index.js +1 -42
- package/dist/components/form/switch-field/index.js +1 -16
- package/dist/components/form/textarea-field/index.js +1 -23
- package/dist/components/page/index.js +1 -20
- package/dist/components/page-header/index.js +1 -80
- package/dist/components/pagination/index.js +1 -10
- package/dist/components/table/id-table-cell.js +1 -109
- package/dist/components/table/index.js +1 -19
- package/dist/components/table/locked-table-actions.js +1 -41
- package/dist/components/table/name-table-cell.js +1 -58
- package/dist/components/ui/accordion/index.js +1 -62
- package/dist/components/ui/alert/index.js +1 -45
- package/dist/components/ui/alert-dialog/index.js +1 -84
- package/dist/components/ui/autocomplete/index.js +1 -440
- package/dist/components/ui/autosize-textarea/index.js +1 -89
- package/dist/components/ui/avatar/index.js +1 -51
- package/dist/components/ui/badge/index.js +1 -83
- package/dist/components/ui/breadcrumb/index.js +1 -35
- package/dist/components/ui/button/index.js +1 -65
- package/dist/components/ui/calendar/index.js +1 -118
- package/dist/components/ui/card/index.js +1 -32
- package/dist/components/ui/checkbox/index.js +1 -44
- package/dist/components/ui/collapsible/index.js +1 -50
- package/dist/components/ui/command/index.js +1 -95
- package/dist/components/ui/copy-field/index.js +1 -163
- package/dist/components/ui/dialog/index.js +1 -80
- package/dist/components/ui/dialog/styles.css +1 -1
- package/dist/components/ui/dropdown-menu/index.js +1 -110
- package/dist/components/ui/field/index.js +1 -82
- package/dist/components/ui/file-upload/index.js +1 -574
- package/dist/components/ui/form.js +1 -162
- package/dist/components/ui/hover-card/index.js +1 -51
- package/dist/components/ui/icon-button/index.js +1 -35
- package/dist/components/ui/input/adornment.js +1 -21
- package/dist/components/ui/input/index.js +1 -99
- package/dist/components/ui/label/index.js +1 -45
- package/dist/components/ui/lerian-wordmark/index.js +1 -7
- package/dist/components/ui/loading-button/index.js +1 -9
- package/dist/components/ui/multiple-select/index.js +1 -235
- package/dist/components/ui/otp-input/index.js +1 -62
- package/dist/components/ui/paper/index.js +1 -8
- package/dist/components/ui/paper-collapsible/index.js +1 -24
- package/dist/components/ui/popover/index.js +1 -55
- package/dist/components/ui/progress/index.js +1 -66
- package/dist/components/ui/qr-code/index.js +1 -27
- package/dist/components/ui/radio-group/index.js +1 -48
- package/dist/components/ui/scroll-area/index.js +1 -49
- package/dist/components/ui/select/index.js +1 -119
- package/dist/components/ui/separator/index.js +1 -43
- package/dist/components/ui/sheet/index.js +1 -136
- package/dist/components/ui/sidebar/index.js +1 -27
- package/dist/components/ui/sidebar/next-router.cjs +1 -119
- package/dist/components/ui/sidebar/sidebar-back-button.js +1 -8
- package/dist/components/ui/sidebar/sidebar-components.js +1 -23
- package/dist/components/ui/sidebar/sidebar-expand-button.js +1 -49
- package/dist/components/ui/sidebar/sidebar-item-button.js +1 -21
- package/dist/components/ui/sidebar/sidebar-item-collapsible.js +1 -52
- package/dist/components/ui/sidebar/sidebar-item-icon-button.js +1 -18
- package/dist/components/ui/sidebar/sidebar-item.js +1 -44
- package/dist/components/ui/sidebar/sidebar-provider.js +1 -201
- package/dist/components/ui/sidebar/sidebar-root.js +1 -130
- package/dist/components/ui/sidebar/sidebar-router.js +1 -126
- package/dist/components/ui/sidebar/sidebar-trigger.js +1 -57
- package/dist/components/ui/skeleton/index.js +1 -8
- package/dist/components/ui/stepper/index.js +1 -29
- package/dist/components/ui/switch/index.js +1 -43
- package/dist/components/ui/table/index.js +1 -56
- package/dist/components/ui/tabs/index.js +1 -55
- package/dist/components/ui/tabs/styles.css +1 -1
- package/dist/components/ui/textarea/index.js +1 -8
- package/dist/components/ui/time-picker/index.js +1 -85
- package/dist/components/ui/toast/index.js +1 -3
- package/dist/components/ui/toast/toaster.js +1 -16
- package/dist/components/ui/toggle-group/index.js +1 -156
- package/dist/components/ui/tooltip/index.js +1 -81
- package/dist/domain/blotter/index.js +1 -20
- package/dist/domain/delinquency-aging/aging-buckets.js +1 -120
- package/dist/domain/delinquency-aging/index.js +1 -222
- package/dist/domain/figure/index.js +1 -19
- package/dist/domain/format.js +1 -137
- package/dist/domain/index.js +1 -43
- package/dist/domain/key-id/index.js +1 -174
- package/dist/domain/ledger-sheet/index.js +1 -28
- package/dist/domain/money-diff.js +1 -48
- package/dist/domain/money-math.js +1 -104
- package/dist/domain/money-text/index.js +1 -123
- package/dist/domain/section-label/index.js +1 -17
- package/dist/domain/status-rail/index.js +1 -76
- package/dist/domain/threshold-gauge/index.js +1 -161
- package/dist/enterprise/alert-banner/index.js +1 -24
- package/dist/enterprise/app-shell/index.js +1 -87
- package/dist/enterprise/cursor-pager/index.js +1 -26
- package/dist/enterprise/data-table/column-size.js +1 -103
- package/dist/enterprise/data-table/index.js +1 -345
- package/dist/enterprise/date-range-picker/index.js +1 -115
- package/dist/enterprise/detail-panel/index.js +1 -20
- package/dist/enterprise/empty-state/index.js +1 -14
- package/dist/enterprise/index.js +1 -39
- package/dist/enterprise/number-input/index.js +1 -252
- package/dist/enterprise/search-input/index.js +1 -121
- package/dist/enterprise/stat-card/index.js +1 -75
- package/dist/enterprise/status-badge/index.js +1 -120
- package/dist/enterprise/use-is-mobile.js +1 -68
- package/dist/enterprise/virtualized-table/index.js +1 -141
- package/dist/esm/charts/chart.js +4 -190
- package/dist/esm/charts/index.js +1 -3
- package/dist/esm/components/breadcrumb/get-breadcrumb-paths.js +1 -12
- package/dist/esm/components/breadcrumb/index.js +1 -30
- package/dist/esm/components/card/account-card/index.js +1 -53
- package/dist/esm/components/card/basic-card/index.js +1 -14
- package/dist/esm/components/card/dashboard-card/index.js +1 -14
- package/dist/esm/components/card/entity-card/index.js +1 -52
- package/dist/esm/components/card/index.js +1 -4
- package/dist/esm/components/dialog/confirmation-dialog/index.js +1 -60
- package/dist/esm/components/dialog/confirmation-dialog/use-confirm-dialog.js +1 -49
- package/dist/esm/components/dialog/index.js +1 -3
- package/dist/esm/components/dialog/large-dialog/index.js +1 -16
- package/dist/esm/components/entity-box/index.js +1 -56
- package/dist/esm/components/entity-data-table/index.js +1 -17
- package/dist/esm/components/form/combo-box-field/index.js +1 -28
- package/dist/esm/components/form/country-field/index.js +1 -7
- package/dist/esm/components/form/date-picker-field/index.js +1 -43
- package/dist/esm/components/form/date-range-field/index.js +1 -18
- package/dist/esm/components/form/date-time-picker-field/index.js +1 -74
- package/dist/esm/components/form/file-upload-field/index.js +1 -65
- package/dist/esm/components/form/index.js +1 -15
- package/dist/esm/components/form/input-field/index.js +1 -92
- package/dist/esm/components/form/otp-field/index.js +1 -15
- package/dist/esm/components/form/pagination-limit-field/index.js +1 -6
- package/dist/esm/components/form/password-field/index.js +1 -10
- package/dist/esm/components/form/radio-group-field/index.js +1 -32
- package/dist/esm/components/form/renderable-label.js +1 -54
- package/dist/esm/components/form/select-field/index.js +1 -64
- package/dist/esm/components/form/state-field/index.js +1 -35
- package/dist/esm/components/form/switch-field/index.js +1 -12
- package/dist/esm/components/form/textarea-field/index.js +1 -19
- package/dist/esm/components/page/index.js +1 -15
- package/dist/esm/components/page-header/index.js +1 -71
- package/dist/esm/components/pagination/index.js +1 -6
- package/dist/esm/components/table/id-table-cell.js +1 -105
- package/dist/esm/components/table/index.js +1 -3
- package/dist/esm/components/table/locked-table-actions.js +1 -37
- package/dist/esm/components/table/name-table-cell.js +1 -54
- package/dist/esm/components/ui/accordion/index.js +1 -24
- package/dist/esm/components/ui/alert/index.js +1 -38
- package/dist/esm/components/ui/alert-dialog/index.js +1 -39
- package/dist/esm/components/ui/autocomplete/index.js +1 -392
- package/dist/esm/components/ui/autosize-textarea/index.js +1 -51
- package/dist/esm/components/ui/avatar/index.js +1 -14
- package/dist/esm/components/ui/badge/index.js +1 -79
- package/dist/esm/components/ui/breadcrumb/index.js +1 -27
- package/dist/esm/components/ui/button/index.js +1 -60
- package/dist/esm/components/ui/calendar/index.js +1 -82
- package/dist/esm/components/ui/card/index.js +1 -24
- package/dist/esm/components/ui/checkbox/index.js +1 -9
- package/dist/esm/components/ui/collapsible/index.js +1 -13
- package/dist/esm/components/ui/command/index.js +1 -51
- package/dist/esm/components/ui/copy-field/index.js +1 -127
- package/dist/esm/components/ui/dialog/index.js +1 -36
- package/dist/esm/components/ui/dropdown-menu/index.js +1 -60
- package/dist/esm/components/ui/field/index.js +1 -71
- package/dist/esm/components/ui/file-upload/index.js +1 -536
- package/dist/esm/components/ui/form.js +1 -118
- package/dist/esm/components/ui/hover-card/index.js +1 -14
- package/dist/esm/components/ui/icon-button/index.js +1 -31
- package/dist/esm/components/ui/input/adornment.js +1 -17
- package/dist/esm/components/ui/input/index.js +1 -60
- package/dist/esm/components/ui/label/index.js +1 -10
- package/dist/esm/components/ui/lerian-wordmark/index.js +1 -4
- package/dist/esm/components/ui/loading-button/index.js +1 -7
- package/dist/esm/components/ui/multiple-select/index.js +1 -196
- package/dist/esm/components/ui/otp-input/index.js +1 -21
- package/dist/esm/components/ui/paper/index.js +1 -5
- package/dist/esm/components/ui/paper-collapsible/index.js +1 -19
- package/dist/esm/components/ui/popover/index.js +1 -17
- package/dist/esm/components/ui/progress/index.js +1 -31
- package/dist/esm/components/ui/qr-code/index.js +1 -24
- package/dist/esm/components/ui/radio-group/index.js +1 -12
- package/dist/esm/components/ui/scroll-area/index.js +1 -13
- package/dist/esm/components/ui/select/index.js +1 -74
- package/dist/esm/components/ui/separator/index.js +1 -8
- package/dist/esm/components/ui/sheet/index.js +1 -92
- package/dist/esm/components/ui/sidebar/index.js +1 -11
- package/dist/esm/components/ui/sidebar/next-router.cjs +1 -119
- package/dist/esm/components/ui/sidebar/sidebar-back-button.js +1 -5
- package/dist/esm/components/ui/sidebar/sidebar-components.js +1 -15
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +1 -42
- package/dist/esm/components/ui/sidebar/sidebar-item-button.js +1 -18
- package/dist/esm/components/ui/sidebar/sidebar-item-collapsible.js +1 -44
- package/dist/esm/components/ui/sidebar/sidebar-item-icon-button.js +1 -14
- package/dist/esm/components/ui/sidebar/sidebar-item.js +1 -40
- package/dist/esm/components/ui/sidebar/sidebar-provider.js +1 -193
- package/dist/esm/components/ui/sidebar/sidebar-root.js +1 -126
- package/dist/esm/components/ui/sidebar/sidebar-router.js +1 -89
- package/dist/esm/components/ui/sidebar/sidebar-trigger.js +1 -53
- package/dist/esm/components/ui/skeleton/index.js +1 -6
- package/dist/esm/components/ui/stepper/index.js +1 -20
- package/dist/esm/components/ui/switch/index.js +1 -8
- package/dist/esm/components/ui/table/index.js +1 -44
- package/dist/esm/components/ui/tabs/index.js +1 -17
- package/dist/esm/components/ui/textarea/index.js +1 -6
- package/dist/esm/components/ui/time-picker/index.js +1 -49
- package/dist/esm/components/ui/toast/index.js +1 -2
- package/dist/esm/components/ui/toast/toaster.js +1 -13
- package/dist/esm/components/ui/toggle-group/index.js +1 -120
- package/dist/esm/components/ui/tooltip/index.js +1 -43
- package/dist/esm/domain/blotter/index.js +1 -16
- package/dist/esm/domain/delinquency-aging/aging-buckets.js +1 -115
- package/dist/esm/domain/delinquency-aging/index.js +1 -218
- package/dist/esm/domain/figure/index.js +1 -15
- package/dist/esm/domain/format.js +1 -128
- package/dist/esm/domain/index.js +1 -19
- package/dist/esm/domain/key-id/index.js +1 -169
- package/dist/esm/domain/ledger-sheet/index.js +1 -24
- package/dist/esm/domain/money-diff.js +1 -45
- package/dist/esm/domain/money-math.js +1 -98
- package/dist/esm/domain/money-text/index.js +1 -118
- package/dist/esm/domain/section-label/index.js +1 -14
- package/dist/esm/domain/status-rail/index.js +1 -71
- package/dist/esm/domain/threshold-gauge/index.js +1 -157
- package/dist/esm/enterprise/alert-banner/index.js +1 -21
- package/dist/esm/enterprise/app-shell/index.js +1 -51
- package/dist/esm/enterprise/cursor-pager/index.js +1 -23
- package/dist/esm/enterprise/data-table/column-size.js +1 -97
- package/dist/esm/enterprise/data-table/index.js +1 -342
- package/dist/esm/enterprise/date-range-picker/index.js +1 -112
- package/dist/esm/enterprise/detail-panel/index.js +1 -17
- package/dist/esm/enterprise/empty-state/index.js +1 -11
- package/dist/esm/enterprise/index.js +1 -22
- package/dist/esm/enterprise/number-input/index.js +1 -214
- package/dist/esm/enterprise/search-input/index.js +1 -85
- package/dist/esm/enterprise/stat-card/index.js +1 -72
- package/dist/esm/enterprise/status-badge/index.js +1 -116
- package/dist/esm/enterprise/use-is-mobile.js +1 -31
- package/dist/esm/enterprise/virtualized-table/index.js +1 -138
- package/dist/esm/hooks/use-click-away.js +1 -22
- package/dist/esm/hooks/use-pagination.js +1 -38
- package/dist/esm/hooks/use-stepper.js +1 -22
- package/dist/esm/hooks/use-time.js +1 -13
- package/dist/esm/hooks/use-toast.js +1 -107
- package/dist/esm/index.js +1 -77
- package/dist/esm/lib/storage/get-storage-object.js +1 -17
- package/dist/esm/lib/storage/get-storage.js +1 -14
- package/dist/esm/lib/storage/index.js +1 -2
- package/dist/esm/lib/typography.js +1 -31
- package/dist/esm/lib/utils.js +1 -41
- package/dist/esm/theme/get-theme-script.js +1 -41
- package/dist/esm/theme/index.js +1 -4
- package/dist/esm/theme/mode-toggle.js +1 -45
- package/dist/esm/theme/theme-provider.js +1 -122
- package/dist/esm/toast/helpers.js +1 -36
- package/dist/esm/toast/index.js +1 -4
- package/dist/esm/types/metadata-type.js +1 -1
- package/dist/esm/utils/countries.cjs +1 -17
- package/dist/esm/utils/country-utils.js +1 -18
- package/dist/esm/utils/currency-codes.js +1 -181
- package/dist/hooks/use-click-away.js +1 -29
- package/dist/hooks/use-pagination.js +1 -41
- package/dist/hooks/use-stepper.js +1 -26
- package/dist/hooks/use-time.js +1 -20
- package/dist/hooks/use-toast.js +1 -111
- package/dist/index.js +1 -96
- package/dist/lib/storage/get-storage-object.js +1 -23
- package/dist/lib/storage/get-storage.js +1 -17
- package/dist/lib/storage/index.js +1 -18
- package/dist/lib/typography.js +1 -34
- package/dist/lib/utils.js +1 -45
- package/dist/theme/get-theme-script.js +1 -44
- package/dist/theme/index.js +1 -11
- package/dist/theme/mode-toggle.js +1 -48
- package/dist/theme/theme-provider.js +1 -160
- package/dist/toast/helpers.js +1 -41
- package/dist/toast/index.js +1 -10
- package/dist/types/metadata-type.js +1 -2
- package/dist/utils/countries.cjs +1 -17
- package/dist/utils/country-utils.js +1 -25
- package/dist/utils/currency-codes.js +1 -184
- package/package.json +4 -3
|
@@ -1,160 +1 @@
|
|
|
1
|
-
|
|
2
|
-
"use strict";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.ThemeProvider = ThemeProvider;
|
|
38
|
-
exports.useTheme = useTheme;
|
|
39
|
-
exports.useOptionalTheme = useOptionalTheme;
|
|
40
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
-
/**
|
|
42
|
-
* ThemeProvider — owns theme preference ('light' | 'dark' | 'system'),
|
|
43
|
-
* persists it to localStorage, applies the `.dark` class on
|
|
44
|
-
* `document.documentElement`, and resolves 'system' via
|
|
45
|
-
* `prefers-color-scheme`.
|
|
46
|
-
*
|
|
47
|
-
* SSR-safe: state initializes to `defaultTheme` and never reads
|
|
48
|
-
* window/localStorage during render. The persisted value is read inside an
|
|
49
|
-
* effect on mount, so first paint uses `defaultTheme`. Pair with
|
|
50
|
-
* `getThemeScript` in the document <head> to remove the flash before paint.
|
|
51
|
-
*
|
|
52
|
-
* Same-tab sync is handled by React context (every consumer reads the same
|
|
53
|
-
* provider state); cross-tab sync rides the native `storage` event. While the
|
|
54
|
-
* preference is 'system', `matchMedia('change')` keeps the resolved value live.
|
|
55
|
-
* Theme switches are instant by design — no global color transition.
|
|
56
|
-
*/
|
|
57
|
-
const React = __importStar(require("react"));
|
|
58
|
-
const DARK_QUERY = '(prefers-color-scheme: dark)';
|
|
59
|
-
function isThemePreference(value) {
|
|
60
|
-
return value === 'light' || value === 'dark' || value === 'system';
|
|
61
|
-
}
|
|
62
|
-
function systemPrefersDark() {
|
|
63
|
-
if (typeof window === 'undefined' ||
|
|
64
|
-
typeof window.matchMedia !== 'function') {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
return window.matchMedia(DARK_QUERY).matches;
|
|
68
|
-
}
|
|
69
|
-
const ThemeContext = React.createContext(null);
|
|
70
|
-
function ThemeProvider({ children, storageKey = 'sindarian.theme', defaultTheme = 'system' }) {
|
|
71
|
-
const [theme, setThemeState] = React.useState(defaultTheme);
|
|
72
|
-
const [resolvedTheme, setResolvedTheme] = React.useState(defaultTheme === 'dark' ? 'dark' : 'light');
|
|
73
|
-
const setTheme = React.useCallback((next) => {
|
|
74
|
-
setThemeState(next);
|
|
75
|
-
if (typeof window === 'undefined')
|
|
76
|
-
return;
|
|
77
|
-
try {
|
|
78
|
-
window.localStorage.setItem(storageKey, next);
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
// Storage unavailable (private mode, quota). In-memory state still works.
|
|
82
|
-
}
|
|
83
|
-
}, [storageKey]);
|
|
84
|
-
// Read the persisted preference once on mount (effect, never render).
|
|
85
|
-
React.useEffect(() => {
|
|
86
|
-
if (typeof window === 'undefined')
|
|
87
|
-
return;
|
|
88
|
-
try {
|
|
89
|
-
const stored = window.localStorage.getItem(storageKey);
|
|
90
|
-
if (isThemePreference(stored))
|
|
91
|
-
setThemeState(stored);
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
// Ignore; keep defaultTheme.
|
|
95
|
-
}
|
|
96
|
-
}, [storageKey]);
|
|
97
|
-
// Apply the resolved class; while 'system', track prefers-color-scheme live.
|
|
98
|
-
React.useEffect(() => {
|
|
99
|
-
if (typeof document === 'undefined')
|
|
100
|
-
return;
|
|
101
|
-
const apply = (dark) => {
|
|
102
|
-
document.documentElement.classList.toggle('dark', dark);
|
|
103
|
-
setResolvedTheme(dark ? 'dark' : 'light');
|
|
104
|
-
};
|
|
105
|
-
apply(theme === 'system' ? systemPrefersDark() : theme === 'dark');
|
|
106
|
-
if (theme !== 'system' || typeof window.matchMedia !== 'function') {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const media = window.matchMedia(DARK_QUERY);
|
|
110
|
-
const onChange = (event) => apply(event.matches);
|
|
111
|
-
media.addEventListener('change', onChange);
|
|
112
|
-
return () => media.removeEventListener('change', onChange);
|
|
113
|
-
}, [theme]);
|
|
114
|
-
// Cross-tab sync: the native `storage` event only fires in OTHER tabs.
|
|
115
|
-
React.useEffect(() => {
|
|
116
|
-
if (typeof window === 'undefined')
|
|
117
|
-
return;
|
|
118
|
-
const onStorage = (event) => {
|
|
119
|
-
// WHICH STORE first, then which key. Only the store the preference lives
|
|
120
|
-
// in may change it: a sessionStorage event carrying the SAME key would
|
|
121
|
-
// otherwise mutate a localStorage-backed preference. `storageArea` is
|
|
122
|
-
// absent only on a hand-dispatched synthetic event — apps use those for
|
|
123
|
-
// same-tab sync — and one of those is not attributable to any store, so it
|
|
124
|
-
// is allowed through rather than silently dropped.
|
|
125
|
-
if (event.storageArea != null &&
|
|
126
|
-
event.storageArea !== window.localStorage)
|
|
127
|
-
return;
|
|
128
|
-
// A null key means another tab called `clear()` on the whole store, so the
|
|
129
|
-
// stored preference is gone even though it is not named. Returning early
|
|
130
|
-
// on that left the provider holding a deleted preference — and the wrong
|
|
131
|
-
// `dark` class on the document. Fall through with newValue null, which
|
|
132
|
-
// lands on the fallback.
|
|
133
|
-
if (event.key !== null && event.key !== storageKey)
|
|
134
|
-
return;
|
|
135
|
-
setThemeState(isThemePreference(event.newValue) ? event.newValue : defaultTheme);
|
|
136
|
-
};
|
|
137
|
-
window.addEventListener('storage', onStorage);
|
|
138
|
-
return () => window.removeEventListener('storage', onStorage);
|
|
139
|
-
}, [storageKey, defaultTheme]);
|
|
140
|
-
const value = React.useMemo(() => ({ theme, setTheme, resolvedTheme }), [theme, setTheme, resolvedTheme]);
|
|
141
|
-
return (0, jsx_runtime_1.jsx)(ThemeContext.Provider, { value: value, children: children });
|
|
142
|
-
}
|
|
143
|
-
/** Reads the theme context. Throws if used outside a ThemeProvider. */
|
|
144
|
-
function useTheme() {
|
|
145
|
-
const context = React.useContext(ThemeContext);
|
|
146
|
-
if (context === null) {
|
|
147
|
-
throw new Error('useTheme must be used within a ThemeProvider');
|
|
148
|
-
}
|
|
149
|
-
return context;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Reads the theme context without requiring a provider — `undefined` when
|
|
153
|
-
* there is none. For library components that should follow the theme when one
|
|
154
|
-
* exists but must not force every consumer to mount a ThemeProvider (Toaster).
|
|
155
|
-
* Not re-exported from the package barrel: consumers use `useTheme`, whose
|
|
156
|
-
* throw is the intended signal that the provider is missing.
|
|
157
|
-
*/
|
|
158
|
-
function useOptionalTheme() {
|
|
159
|
-
return React.useContext(ThemeContext) ?? undefined;
|
|
160
|
-
}
|
|
1
|
+
"use client";"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,e,r,t){if(t===void 0)t=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(n,t,i)}):(function(n,e,r,t){if(t===void 0)t=r;n[t]=e[r]}));var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:true,value:e})}):function(n,e){n["default"]=e});var __importStar=this&&this.__importStar||(function(){var n=function(e){n=Object.getOwnPropertyNames||function(r){var t=[];for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i))t[t.length]=i;return t};return n(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null){for(var t=n(e),i=0;i<t.length;i++)if(t[i]!=="default")__createBinding(r,e,t[i])}__setModuleDefault(r,e);return r}})();Object.defineProperty(exports,"__esModule",{value:true});exports.ThemeProvider=ThemeProvider;exports.useTheme=useTheme;exports.useOptionalTheme=useOptionalTheme;const jsx_runtime_1=require("react/jsx-runtime");const React=__importStar(require("react"));const DARK_QUERY="(prefers-color-scheme: dark)";function isThemePreference(n){return n==="light"||n==="dark"||n==="system"}function systemPrefersDark(){if(typeof window==="undefined"||typeof window.matchMedia!=="function"){return false}return window.matchMedia(DARK_QUERY).matches}const ThemeContext=React.createContext(null);function ThemeProvider({children:n,storageKey:e="sindarian.theme",defaultTheme:r="system"}){const[t,i]=React.useState(r);const[c,d]=React.useState(r==="dark"?"dark":"light");const a=React.useCallback(o=>{i(o);if(typeof window==="undefined")return;try{window.localStorage.setItem(e,o)}catch{}},[e]);React.useEffect(()=>{if(typeof window==="undefined")return;try{const o=window.localStorage.getItem(e);if(isThemePreference(o))i(o)}catch{}},[e]);React.useEffect(()=>{if(typeof document==="undefined")return;const o=s=>{document.documentElement.classList.toggle("dark",s);d(s?"dark":"light")};o(t==="system"?systemPrefersDark():t==="dark");if(t!=="system"||typeof window.matchMedia!=="function"){return}const u=window.matchMedia(DARK_QUERY);const f=s=>o(s.matches);u.addEventListener("change",f);return()=>u.removeEventListener("change",f)},[t]);React.useEffect(()=>{if(typeof window==="undefined")return;const o=u=>{if(u.storageArea!=null&&u.storageArea!==window.localStorage)return;if(u.key!==null&&u.key!==e)return;i(isThemePreference(u.newValue)?u.newValue:r)};window.addEventListener("storage",o);return()=>window.removeEventListener("storage",o)},[e,r]);const l=React.useMemo(()=>({theme:t,setTheme:a,resolvedTheme:c}),[t,a,c]);return(0,jsx_runtime_1.jsx)(ThemeContext.Provider,{value:l,children:n})}function useTheme(){const n=React.useContext(ThemeContext);if(n===null){throw new Error("useTheme must be used within a ThemeProvider")}return n}function useOptionalTheme(){return React.useContext(ThemeContext)??void 0}
|
package/dist/toast/helpers.js
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.successToast = successToast;
|
|
5
|
-
exports.errorToast = errorToast;
|
|
6
|
-
exports.warningToast = warningToast;
|
|
7
|
-
/**
|
|
8
|
-
* Severity toast helpers — thin wrappers over sindarian-ui's own toast
|
|
9
|
-
* machinery (`@/hooks/use-toast`), which renders through `<Toaster />`.
|
|
10
|
-
*
|
|
11
|
-
* The bare `toast` is deliberately NOT re-exported here: sindarian-ui already
|
|
12
|
-
* exports it from the main barrel, and one name must resolve to one function.
|
|
13
|
-
* Call `toast({ title, description, variant })` directly when a helper does not
|
|
14
|
-
* fit.
|
|
15
|
-
*
|
|
16
|
-
* Variant mapping — one helper per severity, onto sindarian-ui's own variants:
|
|
17
|
-
*
|
|
18
|
-
* successToast → 'success' (green)
|
|
19
|
-
* errorToast → 'destructive' (red)
|
|
20
|
-
* warningToast → 'warning' (amber)
|
|
21
|
-
*/
|
|
22
|
-
const use_toast_1 = require("../hooks/use-toast");
|
|
23
|
-
function raise(variant, title, description, opts) {
|
|
24
|
-
(0, use_toast_1.toast)({
|
|
25
|
-
action: opts?.action,
|
|
26
|
-
variant,
|
|
27
|
-
title,
|
|
28
|
-
description,
|
|
29
|
-
duration: opts?.duration,
|
|
30
|
-
id: opts?.id
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function successToast(title, description, opts) {
|
|
34
|
-
raise('success', title, description, opts);
|
|
35
|
-
}
|
|
36
|
-
function errorToast(title, description, opts) {
|
|
37
|
-
raise('destructive', title, description, opts);
|
|
38
|
-
}
|
|
39
|
-
function warningToast(title, description, opts) {
|
|
40
|
-
raise('warning', title, description, opts);
|
|
41
|
-
}
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.successToast=successToast;exports.errorToast=errorToast;exports.warningToast=warningToast;const use_toast_1=require("../hooks/use-toast");function raise(t,s,e,o){(0,use_toast_1.toast)({action:o?.action,variant:t,title:s,description:e,duration:o?.duration,id:o?.id})}function successToast(t,s,e){raise("success",t,s,e)}function errorToast(t,s,e){raise("destructive",t,s,e)}function warningToast(t,s,e){raise("warning",t,s,e)}
|
package/dist/toast/index.js
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.warningToast = exports.errorToast = exports.successToast = void 0;
|
|
4
|
-
// Owned by lane theme-toasts-charts — see docs/plans/2026-08-26-sindarian-x-retirement/
|
|
5
|
-
// NOTE: the bare `toast` is NOT re-exported here — sindarian-ui's main barrel
|
|
6
|
-
// already exports it from `@/hooks/use-toast`.
|
|
7
|
-
var helpers_1 = require("./helpers");
|
|
8
|
-
Object.defineProperty(exports, "successToast", { enumerable: true, get: function () { return helpers_1.successToast; } });
|
|
9
|
-
Object.defineProperty(exports, "errorToast", { enumerable: true, get: function () { return helpers_1.errorToast; } });
|
|
10
|
-
Object.defineProperty(exports, "warningToast", { enumerable: true, get: function () { return helpers_1.warningToast; } });
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.warningToast=exports.errorToast=exports.successToast=void 0;var helpers_1=require("./helpers");Object.defineProperty(exports,"successToast",{enumerable:true,get:function(){return helpers_1.successToast}});Object.defineProperty(exports,"errorToast",{enumerable:true,get:function(){return helpers_1.errorToast}});Object.defineProperty(exports,"warningToast",{enumerable:true,get:function(){return helpers_1.warningToast}});
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});
|
package/dist/utils/countries.cjs
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The country/state dataset, loaded through CommonJS on purpose.
|
|
5
|
-
*
|
|
6
|
-
* A plain `import ... from './countries.json'` compiles fine, but Node's ESM
|
|
7
|
-
* loader rejects it without an `with { type: 'json' }` attribute — and that
|
|
8
|
-
* attribute cannot be written once for a dual build: TypeScript refuses it in
|
|
9
|
-
* any file that compiles to a `require` call (TS2856). Since a JSON `require`
|
|
10
|
-
* needs no attribute in either output, the one-line load lives here, in a
|
|
11
|
-
* `.cjs` file that is CommonJS inside `dist/` and inside `dist/esm/` alike.
|
|
12
|
-
*
|
|
13
|
-
* Without this, `import '@lerianstudio/sindarian-ui'` throws
|
|
14
|
-
* ERR_IMPORT_ATTRIBUTE_MISSING under any native-ESM consumer — Vitest, which
|
|
15
|
-
* externalises ESM dependencies, being the one the apps actually hit.
|
|
16
|
-
*/
|
|
17
|
-
module.exports = require('../public/countries.json')
|
|
1
|
+
"use strict";module.exports=require("../public/countries.json");
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getStateCountry = exports.getCountries = void 0;
|
|
7
|
-
const countries_cjs_1 = __importDefault(require("./countries.cjs"));
|
|
8
|
-
const getCountries = () => {
|
|
9
|
-
return countries_cjs_1.default.map((country) => ({
|
|
10
|
-
code: country.code2,
|
|
11
|
-
name: country.name,
|
|
12
|
-
states: country.states.map((state) => ({
|
|
13
|
-
name: state.name,
|
|
14
|
-
code: state.code
|
|
15
|
-
}))
|
|
16
|
-
}));
|
|
17
|
-
};
|
|
18
|
-
exports.getCountries = getCountries;
|
|
19
|
-
const getStateCountry = (country) => {
|
|
20
|
-
const selectedCountry = getCountries().find((countryItem) => countryItem.code === country || countryItem.name === country);
|
|
21
|
-
if (!selectedCountry)
|
|
22
|
-
return [];
|
|
23
|
-
return selectedCountry.states || [];
|
|
24
|
-
};
|
|
25
|
-
exports.getStateCountry = getStateCountry;
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(exports,"__esModule",{value:true});exports.getStateCountry=exports.getCountries=void 0;const countries_cjs_1=__importDefault(require("./countries.cjs"));const getCountries=()=>{return countries_cjs_1.default.map(e=>({code:e.code2,name:e.name,states:e.states.map(t=>({name:t.name,code:t.code}))}))};exports.getCountries=getCountries;const getStateCountry=e=>{const t=getCountries().find(s=>s.code===e||s.name===e);if(!t)return[];return t.states||[]};exports.getStateCountry=getStateCountry;
|
|
@@ -1,184 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.currencyObjects = exports.currencyCodes = void 0;
|
|
4
|
-
exports.currencyCodes = [
|
|
5
|
-
'AED',
|
|
6
|
-
'AFN',
|
|
7
|
-
'ALL',
|
|
8
|
-
'AMD',
|
|
9
|
-
'ANG',
|
|
10
|
-
'AOA',
|
|
11
|
-
'ARS',
|
|
12
|
-
'AUD',
|
|
13
|
-
'AWG',
|
|
14
|
-
'AZN',
|
|
15
|
-
'BAM',
|
|
16
|
-
'BBD',
|
|
17
|
-
'BDT',
|
|
18
|
-
'BGN',
|
|
19
|
-
'BHD',
|
|
20
|
-
'BIF',
|
|
21
|
-
'BMD',
|
|
22
|
-
'BND',
|
|
23
|
-
'BOB',
|
|
24
|
-
'BOV',
|
|
25
|
-
'BRL',
|
|
26
|
-
'BSD',
|
|
27
|
-
'BTN',
|
|
28
|
-
'BWP',
|
|
29
|
-
'BYR',
|
|
30
|
-
'BZD',
|
|
31
|
-
'CAD',
|
|
32
|
-
'CDF',
|
|
33
|
-
'CHE',
|
|
34
|
-
'CHF',
|
|
35
|
-
'CHW',
|
|
36
|
-
'CLF',
|
|
37
|
-
'CLP',
|
|
38
|
-
'CNY',
|
|
39
|
-
'COP',
|
|
40
|
-
'COU',
|
|
41
|
-
'CRC',
|
|
42
|
-
'CUC',
|
|
43
|
-
'CUP',
|
|
44
|
-
'CVE',
|
|
45
|
-
'CZK',
|
|
46
|
-
'DJF',
|
|
47
|
-
'DKK',
|
|
48
|
-
'DOP',
|
|
49
|
-
'DZD',
|
|
50
|
-
'EGP',
|
|
51
|
-
'ERN',
|
|
52
|
-
'ETB',
|
|
53
|
-
'EUR',
|
|
54
|
-
'FJD',
|
|
55
|
-
'FKP',
|
|
56
|
-
'GBP',
|
|
57
|
-
'GEL',
|
|
58
|
-
'GHS',
|
|
59
|
-
'GIP',
|
|
60
|
-
'GMD',
|
|
61
|
-
'GNF',
|
|
62
|
-
'GTQ',
|
|
63
|
-
'GYD',
|
|
64
|
-
'HKD',
|
|
65
|
-
'HNL',
|
|
66
|
-
'HRK',
|
|
67
|
-
'HTG',
|
|
68
|
-
'HUF',
|
|
69
|
-
'IDR',
|
|
70
|
-
'ILS',
|
|
71
|
-
'INR',
|
|
72
|
-
'IQD',
|
|
73
|
-
'IRR',
|
|
74
|
-
'ISK',
|
|
75
|
-
'JMD',
|
|
76
|
-
'JOD',
|
|
77
|
-
'JPY',
|
|
78
|
-
'KES',
|
|
79
|
-
'KGS',
|
|
80
|
-
'KHR',
|
|
81
|
-
'KMF',
|
|
82
|
-
'KPW',
|
|
83
|
-
'KRW',
|
|
84
|
-
'KWD',
|
|
85
|
-
'KYD',
|
|
86
|
-
'KZT',
|
|
87
|
-
'LAK',
|
|
88
|
-
'LBP',
|
|
89
|
-
'LKR',
|
|
90
|
-
'LRD',
|
|
91
|
-
'LSL',
|
|
92
|
-
'LTL',
|
|
93
|
-
'LVL',
|
|
94
|
-
'LYD',
|
|
95
|
-
'MAD',
|
|
96
|
-
'MDL',
|
|
97
|
-
'MGA',
|
|
98
|
-
'MKD',
|
|
99
|
-
'MMK',
|
|
100
|
-
'MNT',
|
|
101
|
-
'MOP',
|
|
102
|
-
'MRO',
|
|
103
|
-
'MUR',
|
|
104
|
-
'MVR',
|
|
105
|
-
'MWK',
|
|
106
|
-
'MXN',
|
|
107
|
-
'MXV',
|
|
108
|
-
'MYR',
|
|
109
|
-
'MZN',
|
|
110
|
-
'NAD',
|
|
111
|
-
'NGN',
|
|
112
|
-
'NIO',
|
|
113
|
-
'NOK',
|
|
114
|
-
'NPR',
|
|
115
|
-
'NZD',
|
|
116
|
-
'OMR',
|
|
117
|
-
'PAB',
|
|
118
|
-
'PEN',
|
|
119
|
-
'PGK',
|
|
120
|
-
'PHP',
|
|
121
|
-
'PKR',
|
|
122
|
-
'PLN',
|
|
123
|
-
'PYG',
|
|
124
|
-
'QAR',
|
|
125
|
-
'RON',
|
|
126
|
-
'RSD',
|
|
127
|
-
'RUB',
|
|
128
|
-
'RWF',
|
|
129
|
-
'SAR',
|
|
130
|
-
'SBD',
|
|
131
|
-
'SCR',
|
|
132
|
-
'SDG',
|
|
133
|
-
'SEK',
|
|
134
|
-
'SGD',
|
|
135
|
-
'SHP',
|
|
136
|
-
'SLL',
|
|
137
|
-
'SOS',
|
|
138
|
-
'SRD',
|
|
139
|
-
'SSP',
|
|
140
|
-
'STD',
|
|
141
|
-
'SYP',
|
|
142
|
-
'SZL',
|
|
143
|
-
'THB',
|
|
144
|
-
'TJS',
|
|
145
|
-
'TMT',
|
|
146
|
-
'TND',
|
|
147
|
-
'TOP',
|
|
148
|
-
'TRY',
|
|
149
|
-
'TTD',
|
|
150
|
-
'TWD',
|
|
151
|
-
'TZS',
|
|
152
|
-
'UAH',
|
|
153
|
-
'UGX',
|
|
154
|
-
'USD',
|
|
155
|
-
'USN',
|
|
156
|
-
'USS',
|
|
157
|
-
'UYI',
|
|
158
|
-
'UYU',
|
|
159
|
-
'UZS',
|
|
160
|
-
'VEF',
|
|
161
|
-
'VND',
|
|
162
|
-
'VUV',
|
|
163
|
-
'WST',
|
|
164
|
-
'XAF',
|
|
165
|
-
'XAG',
|
|
166
|
-
'XAU',
|
|
167
|
-
'XBA',
|
|
168
|
-
'XBB',
|
|
169
|
-
'XBC',
|
|
170
|
-
'XBD',
|
|
171
|
-
'XCD',
|
|
172
|
-
'XDR',
|
|
173
|
-
'XFU',
|
|
174
|
-
'XOF',
|
|
175
|
-
'XPD',
|
|
176
|
-
'XPF',
|
|
177
|
-
'XPT',
|
|
178
|
-
'XTS',
|
|
179
|
-
'XXX',
|
|
180
|
-
'YER',
|
|
181
|
-
'ZAR',
|
|
182
|
-
'ZMW'
|
|
183
|
-
];
|
|
184
|
-
exports.currencyObjects = exports.currencyCodes.map((code) => ({ code }));
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.currencyObjects=exports.currencyCodes=void 0;exports.currencyCodes=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","USS","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XFU","XOF","XPD","XPF","XPT","XTS","XXX","YER","ZAR","ZMW"];exports.currencyObjects=exports.currencyCodes.map(D=>({code:D}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lerianstudio/sindarian-ui",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.27",
|
|
4
4
|
"description": "Sindarian UI - A UI library for Midaz Console",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"author": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
40
|
"check-types": "tsc --noEmit && tsc -p tsconfig.storybook.json",
|
|
41
|
-
"build": "npm run build:cjs && npm run build:esm && npm run copy:assets && npm run copy:styles",
|
|
41
|
+
"build": "npm run build:cjs && npm run build:esm && node scripts/minify-dist.mjs && node scripts/check-esm-output.mjs && npm run copy:assets && npm run copy:styles",
|
|
42
42
|
"build:cjs": "tsc && tsc-alias -p tsconfig.json && copyfiles -u 1 \"src/**/*.cjs\" \"src/**/*.d.cts\" \"src/**/*.json\" dist",
|
|
43
|
-
"build:esm": "tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json --resolve-full-paths && copyfiles -u 1 \"src/**/*.cjs\" \"src/**/*.d.cts\" \"src/**/*.json\" dist/esm && node -e \"require('fs').writeFileSync('dist/esm/package.json',JSON.stringify({type:'module'}))\"
|
|
43
|
+
"build:esm": "tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json --resolve-full-paths && copyfiles -u 1 \"src/**/*.cjs\" \"src/**/*.d.cts\" \"src/**/*.json\" dist/esm && node -e \"require('fs').writeFileSync('dist/esm/package.json',JSON.stringify({type:'module'}))\"",
|
|
44
44
|
"copy:assets": "copyfiles -f \"src/public/**/*\" dist/public && copyfiles -u 1 \"src/fonts/*\" dist",
|
|
45
45
|
"copy:styles": "copyfiles -u 1 \"src/**/*.css\" dist",
|
|
46
46
|
"lint": "eslint .",
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
"@storybook/nextjs": "^10.4.6",
|
|
112
112
|
"@types/react": "^19.2.17",
|
|
113
113
|
"@types/react-dom": "^19.2.5",
|
|
114
|
+
"esbuild": "^0.27.7",
|
|
114
115
|
"next": "^16.2.6",
|
|
115
116
|
"storybook": "^10.4.6"
|
|
116
117
|
},
|