@ostack.tech/ui 1.3.0-beta.0 → 1.3.0-beta.2
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/chunks/{en-DGLb7rrz.js → en-W4OWqPrv.js} +3 -4
- package/dist/chunks/en-W4OWqPrv.js.map +1 -0
- package/dist/chunks/{platformUtils-dLFQaWJG.js → platformUtils-Dm2Fkhni.js} +2 -3
- package/dist/chunks/{platformUtils-dLFQaWJG.js.map → platformUtils-Dm2Fkhni.js.map} +1 -1
- package/dist/locales/en-GB.js +2 -3
- package/dist/locales/en-GB.js.map +1 -1
- package/dist/locales/en-US.js +2 -3
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/fr-FR.js +2 -3
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +2 -3
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +84 -24
- package/dist/ostack-ui.js +2070 -2307
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +7 -7
- package/scss/components/DropdownMenu/_DropdownMenu.scss +8 -2
- package/scss/components/Grid/_Grid.scss +6 -0
- package/scss/components/Stack/_Stack.scss +2 -2
- package/scss/scss/placeholders/popover/_popover.scss +2 -2
- package/types/components/Alert/Alert.d.ts +1 -1
- package/types/components/AlertDialog/AlertDialog.d.ts +0 -1
- package/types/components/AlertDialog/AlertDialogBody.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +2 -2
- package/types/components/Box/Box.d.ts +1 -1
- package/types/components/Calendar/Calendar.d.ts +1 -1
- package/types/components/Calendar/CalendarContext.d.ts +1 -0
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
- package/types/components/CommandMenu/CommandMenuItem.d.ts +6 -0
- package/types/components/CommandMenu/cmdk/index.d.ts +2 -2
- package/types/components/Container/Container.d.ts +1 -1
- package/types/components/DataTable/DataTable.d.ts +13 -6
- package/types/components/DataTable/DataTableBody.d.ts +2 -3
- package/types/components/DataTable/DataTableContent.d.ts +1 -1
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +1 -5
- package/types/components/DataTable/ScrolledDataTableRows.d.ts +2 -2
- package/types/components/DataTable/useVirtualizerSnapshot.d.ts +13 -0
- package/types/components/DateInput/DateInput.d.ts +4 -4
- package/types/components/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuContent.d.ts +3 -2
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +6 -0
- package/types/components/Form/Form.d.ts +12 -3
- package/types/components/Form/FormError.d.ts +3 -2
- package/types/components/Grid/Grid.d.ts +8 -1
- package/types/components/Keyboard/Keyboard.d.ts +1 -5
- package/types/components/Link/Link.d.ts +1 -1
- package/types/components/NumericInput/NumericInput.d.ts +4 -4
- package/types/components/Output/Output.d.ts +12 -0
- package/types/components/Select/Select.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +1 -1
- package/types/components/Slot/Slot.d.ts +1 -1
- package/types/components/Stack/Stack.d.ts +6 -2
- package/types/components/Table/TableCell.d.ts +2 -2
- package/types/components/Text/Text.d.ts +2 -6
- package/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/types/index.d.ts +8 -7
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +1 -1
- package/types/utils/localeUtils.d.ts +8 -0
- package/dist/chunks/en-DGLb7rrz.js.map +0 -1
package/types/index.d.ts
CHANGED
|
@@ -71,24 +71,22 @@ export * from "./providers/ToastManagerProvider";
|
|
|
71
71
|
export * from "./utils/boolDataAttr.ts";
|
|
72
72
|
export * from "./utils/breakpoints.ts";
|
|
73
73
|
export * from "./utils/combineAriaIds.ts";
|
|
74
|
-
export * from "./utils/useCombinedEventHandler.ts";
|
|
75
74
|
export * from "./utils/cx.ts";
|
|
76
75
|
export * from "./utils/filtering.ts";
|
|
77
76
|
export * from "./utils/keyboardShortcut.ts";
|
|
78
|
-
export * from "./utils/
|
|
77
|
+
export * from "./utils/localeUtils.ts";
|
|
79
78
|
export * from "./utils/nativeControls.ts";
|
|
80
79
|
export * from "./utils/navigate.ts";
|
|
81
80
|
export * from "./utils/numericStringUtils.ts";
|
|
82
|
-
export * from "./utils/usePaddingProps.ts";
|
|
83
81
|
export * from "./utils/parseChildren.ts";
|
|
84
82
|
export * from "./utils/parseDateStrict.ts";
|
|
85
83
|
export * from "./utils/polymorphicTypes.ts";
|
|
86
84
|
export * from "./utils/reactCompilerUtils.ts";
|
|
85
|
+
export * from "./utils/responsiveValues.ts";
|
|
87
86
|
export * from "./utils/setNativeProperty.ts";
|
|
88
|
-
export * from "./utils/useSizingProps.ts";
|
|
89
87
|
export * from "./utils/sorting.ts";
|
|
90
88
|
export * from "./utils/stringHash.ts";
|
|
91
|
-
export * from "./utils/
|
|
89
|
+
export * from "./utils/useCombinedEventHandler.ts";
|
|
92
90
|
export * from "./utils/useCombinedRef.ts";
|
|
93
91
|
export * from "./utils/useConstant.ts";
|
|
94
92
|
export * from "./utils/useControllableState.ts";
|
|
@@ -97,16 +95,19 @@ export * from "./utils/useDateTransformer.tsx";
|
|
|
97
95
|
export * from "./utils/useIntersectionObserver.ts";
|
|
98
96
|
export * from "./utils/useLatestRef.ts";
|
|
99
97
|
export * from "./utils/useLocation.ts";
|
|
98
|
+
export * from "./utils/useMarginProps.ts";
|
|
100
99
|
export * from "./utils/useMeasure.ts";
|
|
101
100
|
export * from "./utils/useMediaQuery.ts";
|
|
102
101
|
export * from "./utils/useNumericTransformer.tsx";
|
|
102
|
+
export * from "./utils/usePaddingProps.ts";
|
|
103
103
|
export * from "./utils/usePrevious.ts";
|
|
104
|
-
export * from "./utils/responsiveValues.ts";
|
|
105
104
|
export * from "./utils/useSafeLayoutEffect.ts";
|
|
106
|
-
export * from "./utils/useScrollbarSize.ts";
|
|
107
105
|
export * from "./utils/useScrollPosition.ts";
|
|
106
|
+
export * from "./utils/useScrollbarSize.ts";
|
|
108
107
|
export * from "./utils/useSearchParam.ts";
|
|
109
108
|
export * from "./utils/useSearchParams.ts";
|
|
109
|
+
export * from "./utils/useSizingProps.ts";
|
|
110
110
|
export * from "./utils/useSpacing.ts";
|
|
111
|
+
export * from "./utils/useTextProps.ts";
|
|
111
112
|
export * from "./utils/warnOnce.ts";
|
|
112
113
|
export * from "./utils/zustandUtils.ts";
|
|
@@ -36,7 +36,7 @@ export interface AlertDialogOptions {
|
|
|
36
36
|
*/
|
|
37
37
|
triggerElement?: HTMLElement | null;
|
|
38
38
|
/** Properties to pass to the alert dialog's content component. */
|
|
39
|
-
contentProps?: Omit<AlertDialogContentProps, "
|
|
39
|
+
contentProps?: Omit<AlertDialogContentProps, "variant" | "color" | "size">;
|
|
40
40
|
/** Properties to pass to the alert dialog's header component. */
|
|
41
41
|
headerProps?: AlertDialogHeaderProps;
|
|
42
42
|
/** Properties to pass to the alert dialog's title component. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the label for a given locale.
|
|
3
|
+
*
|
|
4
|
+
* If the list of available locales is provided as the second argument and there are multiple
|
|
5
|
+
* available locales sharing the provided locale's language, then the label will contain the
|
|
6
|
+
* provided locale's region for disambiguation.
|
|
7
|
+
*/
|
|
8
|
+
export declare function localeLabel<T extends string = string>(locale: T, availableLocales?: readonly T[]): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-DGLb7rrz.js","names":[],"sources":["../../src/locales/en.tsx"],"sourcesContent":["import type { LocalizationObject } from \"../providers/LocalizationProvider\";\nimport { IS_APPLE } from \"../utils/platformUtils.ts\";\n\n/** `en` locale (partial). */\nexport const en: Omit<LocalizationObject, \"languageTag\" | \"dayPickerLocale\"> = {\n ActionSplit: {\n splitLabel: \"More options\",\n },\n ActionsSecondary: {\n label: \"More actions\",\n },\n AlertDialog: {\n okText: \"OK\",\n },\n Calendar: {\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n previousMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n },\n CloseButton: {\n label: \"Close\",\n },\n CollapsibleTrigger: {\n expandLabel: \"Show\",\n collapseLabel: \"Hide\",\n },\n CommandMenu: {\n searchPlaceholder: \"Search…\",\n listLabel: \"Suggestions\",\n loadingLabel: \"Loading…\",\n emptyMessage: \"No results found.\",\n },\n CommandMenuDialog: {\n title: \"Command palette\",\n description: \"Search for a command…\",\n },\n ConfirmDialog: {\n cancelText: \"Cancel\",\n },\n ControlCode: {\n visuallyHiddenPrefix: \"Field\",\n },\n DataTable: {\n selectAllRowsLabel: \"Select all\",\n selectRowLabel: \"Select\",\n },\n DataTableContent: {\n emptyMessage: \"Nothing to show.\",\n },\n DataTableFilter: {\n \"aria-label\": \"Search table\",\n placeholder: \"Search…\",\n },\n DataTablePagination: {\n \"aria-label\": \"Table pagination\",\n rowsRangeSelectLabel: (total) => `Visible rows out of ${total}`,\n rowsRange: (range, total) => (\n <>\n Rows {range} of {total}\n </>\n ),\n previousPageButtonLabel: \"Previous page\",\n nextPageButtonLabel: \"Next page\",\n },\n DataTableRowsPerPage: {\n label: \"Rows per page:\",\n },\n DateInput: {\n selectedDateDescription: (date) => `Selected date, ${date}`,\n calendarButtonLabel: \"Open calendar\",\n },\n DateRangeInput: {\n startInputLabel: \"Start date\",\n endInputLabel: \"End date\",\n selectedDateRangeDescription: ({ start, end }) =>\n `Selected date range, ${start || \"missing start date\"} to ${end || \"missing end date\"}`,\n },\n ErrorBoundary: {\n fallbackMessage: (\n <>\n Something went wrong.\n <br />\n Press the button on the right to try again. If the problem persists, please try again later.\n </>\n ),\n resetButtonLabel: \"Retry\",\n },\n Feedback: {\n visuallyHiddenPrefix: (type) =>\n type === \"error\" ? \"Error,\" : type === \"warning\" ? \"Warning,\" : null,\n },\n FeedbackPopover: {\n label: \"Show feedback\",\n },\n FieldGroupHeader: {\n visuallyHiddenCodePrefix: \"Section\",\n },\n Form: {\n submitErrorMessage: \"An error occurred during submission. Please try again later.\",\n nativeErrorMessages: {\n valueMissing: \"Required.\",\n badInput: \"Unrecognized format.\",\n typeMismatch: (el) => {\n const type = (el as HTMLInputElement).type;\n return type === \"email\" ? \"Invalid email.\" : \"Invalid URL.\";\n },\n patternMismatch: \"Invalid format.\",\n tooShort: (el) => {\n const minLength = (el as HTMLInputElement).minLength;\n return `Requires at least ${minLength} ${minLength === 1 ? \"character\" : \"characters\"}.`;\n },\n tooLong: (el) => {\n const maxLength = (el as HTMLInputElement).maxLength;\n return `Limited to at most ${maxLength} ${maxLength === 1 ? \"character\" : \"characters\"}.`;\n },\n rangeUnderflow: (el) => {\n const min = (el as HTMLInputElement).min;\n return `Below minimum of ${min}.`;\n },\n rangeOverflow: (el) => {\n const max = (el as HTMLInputElement).max;\n return `Above maximum of ${max}.`;\n },\n stepMismatch: \"Invalid value increment.\",\n },\n },\n Input: {\n loadingDescription: \"Loading…\",\n clearButtonLabel: \"Clear\",\n },\n Keybinds: {\n keybindsSeparatorLabel: \"or\",\n keyPressesSeparatorLabel: \"then\",\n keyLabels: {\n Meta: IS_APPLE ? undefined : \"Windows Key\",\n },\n },\n Label: {\n helperButtonLabel: \"Show help\",\n },\n NumericInput: {\n decimalSeparator: \".\",\n groupingStyle: \"thousand\",\n groupSeparator: \",\",\n },\n RadioGroup: {\n clearDescription: \"Press Backspace or Delete to clear.\",\n },\n Select: {\n placeholder: \"Select…\",\n clearDescription: \"Press Backspace or Delete to clear.\",\n searchLabel: \"Search options\",\n optionsLabel: \"Options\",\n valueTagCloseButtonLabel: \"Remove\",\n },\n Step: {\n stepNumberLabel: (number) => `Step ${number}`,\n completedLabel: \"Completed\",\n },\n StepperFinishTrigger: {\n label: \"Finish\",\n },\n StepperNextTrigger: {\n label: \"Next\",\n },\n StepperPreviousTrigger: {\n label: \"Back\",\n },\n TableColumn: {\n helperButtonLabel: \"Show help\",\n },\n TableHead: {\n sortByColumnDescription: (sortDirection) =>\n sortDirection === null\n ? \"Clear sort\"\n : `Sort ${sortDirection === \"asc\" ? \"ascending\" : \"descending\"}`,\n },\n TabList: {\n scrollLeftButtonLabel: \"Scroll left\",\n scrollRightButtonLabel: \"Scroll right\",\n },\n ToastProvider: {\n label: \"Notification\",\n },\n ToastViewport: {\n label: \"Notifications ({hotkey})\",\n },\n};\n"],"mappings":";;;;AAIA,IAAa,KAAkE;CAC7E,aAAa,EACX,YAAY,eACd;CACA,kBAAkB,EAChB,OAAO,eACT;CACA,aAAa,EACX,QAAQ,KACV;CACA,UAAU;EACR,kBAAkB;EAClB,iBAAiB;EACjB,oBAAoB;EACpB,gBAAgB;CAClB;CACA,aAAa,EACX,OAAO,QACT;CACA,oBAAoB;EAClB,aAAa;EACb,eAAe;CACjB;CACA,aAAa;EACX,mBAAmB;EACnB,WAAW;EACX,cAAc;EACd,cAAc;CAChB;CACA,mBAAmB;EACjB,OAAO;EACP,aAAa;CACf;CACA,eAAe,EACb,YAAY,SACd;CACA,aAAa,EACX,sBAAsB,QACxB;CACA,WAAW;EACT,oBAAoB;EACpB,gBAAgB;CAClB;CACA,kBAAkB,EAChB,cAAc,mBAChB;CACA,iBAAiB;EACf,cAAc;EACd,aAAa;CACf;CACA,qBAAqB;EACnB,cAAc;EACd,uBAAuB,UAAU,uBAAuB;EACxD,YAAY,OAAO,UACjB,qBAAA,UAAA,EAAA,UAAA;GAAE;GACW;GAAM;GAAU;EAC3B,EAAA,CAAA;EAEJ,yBAAyB;EACzB,qBAAqB;CACvB;CACA,sBAAsB,EACpB,OAAO,iBACT;CACA,WAAW;EACT,0BAA0B,SAAS,kBAAkB;EACrD,qBAAqB;CACvB;CACA,gBAAgB;EACd,iBAAiB;EACjB,eAAe;EACf,+BAA+B,EAAE,OAAO,UACtC,wBAAwB,SAAS,qBAAqB,MAAM,OAAO;CACvE;CACA,eAAe;EACb,iBACE,qBAAA,UAAA,EAAA,UAAA;GAAE;GAEA,oBAAC,MAAD,CAAK,CAAA;GAAC;EAEN,EAAA,CAAA;EAEJ,kBAAkB;CACpB;CACA,UAAU,EACR,uBAAuB,SACrB,SAAS,UAAU,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