@ryuzaki13/react-foundation-ui 1.0.5 → 1.0.7
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/advanced-search/index.js +3 -3
- package/dist/chunks/{DateInput--tfofQ2x.js → DateInput-CaKGXluL.js} +2 -2
- package/dist/chunks/{DateInput--tfofQ2x.js.map → DateInput-CaKGXluL.js.map} +1 -1
- package/dist/chunks/{DropZone-kJfbZU5g.js → DropZone-DdFdnC9X.js} +2 -2
- package/dist/chunks/{DropZone-kJfbZU5g.js.map → DropZone-DdFdnC9X.js.map} +1 -1
- package/dist/chunks/{Input-BmjlpA09.js → Input-BYUl3UFn.js} +2 -4
- package/dist/chunks/{Input-BmjlpA09.js.map → Input-BYUl3UFn.js.map} +1 -1
- package/dist/chunks/{InputDateTime-CxfAFe2L.js → InputDateTime-DBkWb0lk.js} +2 -2
- package/dist/chunks/{InputDateTime-CxfAFe2L.js.map → InputDateTime-DBkWb0lk.js.map} +1 -1
- package/dist/chunks/{InputFile-CyZu__B_.js → InputFile-Bo3CN73O.js} +2 -2
- package/dist/chunks/{InputFile-CyZu__B_.js.map → InputFile-Bo3CN73O.js.map} +1 -1
- package/dist/chunks/{InputFiles-CrTJV27R.js → InputFiles-gIxOPv5y.js} +2 -2
- package/dist/chunks/{InputFiles-CrTJV27R.js.map → InputFiles-gIxOPv5y.js.map} +1 -1
- package/dist/chunks/{InputImage-Cw8rPYQu.js → InputImage-k4l1J_tm.js} +2 -2
- package/dist/chunks/{InputImage-Cw8rPYQu.js.map → InputImage-k4l1J_tm.js.map} +1 -1
- package/dist/chunks/{MultiSelect-D1XYuwH1.js → MultiSelect-B0nfMSpS.js} +2 -2
- package/dist/chunks/{MultiSelect-D1XYuwH1.js.map → MultiSelect-B0nfMSpS.js.map} +1 -1
- package/dist/chunks/{PresetRangeDateInput-CapirptQ.js → PresetRangeDateInput-C5HqkOCG.js} +2 -2
- package/dist/chunks/{PresetRangeDateInput-CapirptQ.js.map → PresetRangeDateInput-C5HqkOCG.js.map} +1 -1
- package/dist/chunks/{Select-BJ5OqTe7.js → Select-B6kxgxK2.js} +2 -2
- package/dist/chunks/{Select-BJ5OqTe7.js.map → Select-B6kxgxK2.js.map} +1 -1
- package/dist/chunks/{SerializableSelect-CNe728Qa.js → SerializableSelect-CVGFjCGK.js} +2 -2
- package/dist/chunks/{SerializableSelect-CNe728Qa.js.map → SerializableSelect-CVGFjCGK.js.map} +1 -1
- package/dist/chunks/{SingleDateTimeInput-BmeuVGQT.js → SingleDateTimeInput-D2fDMQnI.js} +2 -2
- package/dist/chunks/{SingleDateTimeInput-BmeuVGQT.js.map → SingleDateTimeInput-D2fDMQnI.js.map} +1 -1
- package/dist/chunks/{StateSelect-ujAre258.js → StateSelect-CEp7kGGg.js} +2 -2
- package/dist/chunks/{StateSelect-ujAre258.js.map → StateSelect-CEp7kGGg.js.map} +1 -1
- package/dist/chunks/{TextEditorLexicalClient-CovUSRag.js → TextEditorLexicalClient-uvFboXlh.js} +2 -2
- package/dist/chunks/{TextEditorLexicalClient-CovUSRag.js.map → TextEditorLexicalClient-uvFboXlh.js.map} +1 -1
- package/dist/chunks/{Textarea-C9UdUueF.js → Textarea-T8gXua35.js} +2 -2
- package/dist/chunks/{Textarea-C9UdUueF.js.map → Textarea-T8gXua35.js.map} +1 -1
- package/dist/chunks/{TreeMultiSelect-CfQhlfnC.js → TreeMultiSelect-BcPr2Phe.js} +2 -2
- package/dist/chunks/{TreeMultiSelect-CfQhlfnC.js.map → TreeMultiSelect-BcPr2Phe.js.map} +1 -1
- package/dist/chunks/{TreePickerBase-BBUOWsSu.js → TreePickerBase-ClXn2q3u.js} +3 -3
- package/dist/chunks/{TreePickerBase-BBUOWsSu.js.map → TreePickerBase-ClXn2q3u.js.map} +1 -1
- package/dist/chunks/{TreeSelect-2wUXs90E.js → TreeSelect-DYWkgryS.js} +2 -2
- package/dist/chunks/{TreeSelect-2wUXs90E.js.map → TreeSelect-DYWkgryS.js.map} +1 -1
- package/dist/chunks/{input-search-Dw4rnJBq.js → input-search-BR4LDmyb.js} +2 -2
- package/dist/chunks/{input-search-Dw4rnJBq.js.map → input-search-BR4LDmyb.js.map} +1 -1
- package/dist/chunks/{layout-picker-MWaImn3L.js → layout-picker-C1sizRYa.js} +2 -2
- package/dist/chunks/{layout-picker-MWaImn3L.js.map → layout-picker-C1sizRYa.js.map} +1 -1
- package/dist/chunks/{multi-select-BYsbh2ca.js → multi-select-DCY3fonG.js} +2 -2
- package/dist/chunks/{multi-select-BYsbh2ca.js.map → multi-select-DCY3fonG.js.map} +1 -1
- package/dist/chunks/{picker-Dg55Ss-B.js → picker-DGXq3ikg.js} +2 -2
- package/dist/chunks/{picker-Dg55Ss-B.js.map → picker-DGXq3ikg.js.map} +1 -1
- package/dist/chunks/{select-BkLc6dyx.js → select-Di99RAVO.js} +3 -3
- package/dist/chunks/{select-BkLc6dyx.js.map → select-Di99RAVO.js.map} +1 -1
- package/dist/chunks/{slider-CFKsfxFp.js → slider-BqeYbdrg.js} +3 -3
- package/dist/chunks/{slider-CFKsfxFp.js.map → slider-BqeYbdrg.js.map} +1 -1
- package/dist/date-input/index.js +1 -1
- package/dist/date-input/stories/DateInput.stories.js +1 -1
- package/dist/date-range-preset-select/stories/DateRangePresetSelect.stories.js +1 -1
- package/dist/date-time-input/index.js +1 -1
- package/dist/date-time-input/stories/SingleDateTimeInput.stories.js +1 -1
- package/dist/drop-zone/index.js +1 -1
- package/dist/drop-zone/stories/DropZone.stories.js +1 -1
- package/dist/expandable-action-panel/stories/ExpandableActionPanel.stories.js +2 -2
- package/dist/image/index.js +2 -2
- package/dist/input/Input.d.ts +1 -1
- package/dist/input/Input.d.ts.map +1 -1
- package/dist/input/InputErrorComponent.d.ts +6 -0
- package/dist/input/InputErrorComponent.d.ts.map +1 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.d.ts.map +1 -1
- package/dist/input/index.js +14 -2
- package/dist/input/index.js.map +1 -0
- package/dist/input/stories/Input.stories.js +2 -2
- package/dist/input/stories/Input.stories.js.map +1 -1
- package/dist/input-date-time/index.js +1 -1
- package/dist/input-date-time/stories/InputDateTime.stories.js +1 -1
- package/dist/input-file/index.js +1 -1
- package/dist/input-file/stories/InputFile.stories.js +1 -1
- package/dist/input-files/index.js +1 -1
- package/dist/input-files/stories/InputFiles.stories.js +1 -1
- package/dist/input-image/index.js +1 -1
- package/dist/input-image/stories/InputImage.stories.js +1 -1
- package/dist/input-search/index.js +1 -1
- package/dist/layout-picker/index.js +1 -1
- package/dist/layout-picker/stories/LayoutPicker.stories.js +1 -1
- package/dist/modal/stories/Modal.stories.js +1 -1
- package/dist/multi-select/index.js +2 -2
- package/dist/multi-select/ui/stories/MultiSelect.stories.js +1 -1
- package/dist/period-select/stories/PeriodSelect.stories.js +1 -1
- package/dist/picker/index.js +1 -1
- package/dist/popover/stories/Popover.stories.js +1 -1
- package/dist/preset-range-date-input/index.js +1 -1
- package/dist/preset-range-date-input/ui/stories/PresetRangeDateInput.stories.js +1 -1
- package/dist/preset-select/index.js +1 -1
- package/dist/select/index.js +3 -3
- package/dist/select/stories/Select.stories.js +1 -1
- package/dist/select/stories/SerializableSelect.stories.js +1 -1
- package/dist/slider/SliderInput.d.ts +2 -2
- package/dist/slider/SliderInput.d.ts.map +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/slider/stories/Slider.stories.js +1 -1
- package/dist/slider/stories/SliderInput.stories.js +1 -1
- package/dist/slider/stories/SliderInput.stories.js.map +1 -1
- package/dist/state-select/index.js +1 -1
- package/dist/state-select/stories/StateSelect.stories.js +1 -1
- package/dist/text-editor/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/stories/Textarea.stories.js +1 -1
- package/dist/tree-select/index.js +2 -2
- package/dist/tree-select/stories/TreeMultiSelect.stories.js +1 -1
- package/dist/tree-select/stories/TreeSelect.stories.js +1 -1
- package/package.json +1 -1
package/dist/input/Input.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare function InputText({ label, description, disabled, className, onC
|
|
|
57
57
|
/**
|
|
58
58
|
* Числовое поле ввода с нормализацией значения и защитой от промежуточного невалидного ввода.
|
|
59
59
|
*/
|
|
60
|
-
export declare function InputNumber({ label, description, disabled, className, onClear, error, onClearError, onChange, value, size, endAdornment, endAdornmentClassName, endAdornmentWidth, ...props }: BaseInputProps<number
|
|
60
|
+
export declare function InputNumber({ label, description, disabled, className, onClear, error, onClearError, onChange, value, size, endAdornment, endAdornmentClassName, endAdornmentWidth, ...props }: BaseInputProps<number>): React.JSX.Element;
|
|
61
61
|
/**
|
|
62
62
|
* Совместимый алиас для `InputText`.
|
|
63
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,mBAAmB,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAMlH,OAAO,EAAE,WAAW,EAAU,MAAM,UAAU,CAAC;AAM/C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAi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,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,GAAG,KAAK,EACR,EAAE,cAAc,CAAC,MAAM,CAAC,qBAuFxB;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,kBAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputErrorComponent.d.ts","sourceRoot":"","sources":["../../src/input/InputErrorComponent.tsx"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IACjC,IAAI,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,wBAAwB,+BAErE"}
|
package/dist/input/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,OAAO,CAAC"}
|
package/dist/input/index.js
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as e } from "../chunks/ui.module-BisoTevy.js";
|
|
2
|
+
import { a as t, c as n, i as r, n as i, o as a, r as o, s, t as c } from "../chunks/Input-BYUl3UFn.js";
|
|
3
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
4
|
+
//#region src/input/InputErrorComponent.tsx
|
|
5
|
+
function u({ text: t }) {
|
|
6
|
+
return /* @__PURE__ */ l("div", {
|
|
7
|
+
className: e.uiErrorElement,
|
|
8
|
+
children: t
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { c as Input, i as InputClearButton, o as InputControl, u as InputErrorComponent, r as InputNumber, t as InputText, a as InputUI, s as InputUILoading, n as useInputFieldIds };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/input/InputErrorComponent.tsx"],"sourcesContent":["import styles from \"../ui.module.scss\";\n\ninterface InputErrorComponentProps {\n\ttext: string;\n}\n\nexport function InputErrorComponent({ text }: InputErrorComponentProps) {\n\treturn <div className={styles.uiErrorElement}>{text}</div>;\n}\n"],"mappings":";;;;AAMA,SAAgB,EAAoB,EAAE,WAAkC;CACvE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAO;YAAiB;CAAU,CAAA;AAC1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t } from "../../chunks/Input-
|
|
1
|
+
import { a as e, i as t } from "../../chunks/Input-BYUl3UFn.js";
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/input/stories/Input.stories.tsx
|
|
@@ -95,7 +95,7 @@ var i = {
|
|
|
95
95
|
min: 0,
|
|
96
96
|
max: 100,
|
|
97
97
|
onChange: i,
|
|
98
|
-
onClear: () => i(
|
|
98
|
+
onClear: () => i(0)
|
|
99
99
|
});
|
|
100
100
|
},
|
|
101
101
|
args: { value: void 0 }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.js","names":[],"sources":["../../../src/input/stories/Input.stories.tsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Meta, StoryObj } from \"@storybook/react-vite\";\n\nimport { InputNumber, InputText } from \"../Input\";\n\nconst meta = {\n\ttitle: \"Shared/UI/Input\",\n\tcomponent: InputText,\n\targs: {\n\t\tvalue: \"\",\n\t\tonChange: () => {}\n\t},\n\tparameters: {\n\t\tatomicCanvas: true,\n\t\tlayout: \"padded\"\n\t},\n\ttags: [\"autodocs\"],\n\targTypes: {\n\t\tlabel: {\n\t\t\tdescription: \"Заголовок поля.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tdescription: {\n\t\t\tdescription: \"Описание под заголовком.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tplaceholder: {\n\t\t\tdescription: \"Плейсхолдер нативного поля ввода.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tvalue: {\n\t\t\tdescription: \"Текущее значение поля.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tonChange: {\n\t\t\tdescription: \"Вызывается при изменении значения.\",\n\t\t\tcontrol: false\n\t\t},\n\t\tonClear: {\n\t\t\tdescription: \"Callback кнопки очистки справа.\",\n\t\t\tcontrol: false\n\t\t},\n\t\terror: {\n\t\t\tdescription: \"Текст ошибки под полем.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tonClearError: {\n\t\t\tdescription: \"Вызывается при вводе для сброса внешней ошибки.\",\n\t\t\tcontrol: false\n\t\t},\n\t\tdisabled: {\n\t\t\tdescription: \"Блокирует редактирование.\",\n\t\t\tcontrol: \"boolean\"\n\t\t},\n\t\tsize: {\n\t\t\tdescription: \"Размер поля и подписи.\",\n\t\t\tcontrol: \"select\",\n\t\t\toptions: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"]\n\t\t},\n\t\tallowedPattern: {\n\t\t\tdescription: \"Регулярное выражение для валидации введенной строки.\",\n\t\t\tcontrol: false\n\t\t}\n\t}\n} satisfies Meta<typeof InputText>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const TextControlled: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState(args.value ?? \"\");\n\t\treturn <InputText {...args} value={value} onChange={setValue} onClear={() => setValue(\"\")} />;\n\t},\n\targs: {\n\t\tlabel: \"Наименование\",\n\t\tdescription: \"Пример обычного текстового поля.\",\n\t\tplaceholder: \"Введите значение\",\n\t\tvalue: \"\",\n\t\tsize: \"md\"\n\t}\n};\n\nexport const NumberControlled: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<number
|
|
1
|
+
{"version":3,"file":"Input.stories.js","names":[],"sources":["../../../src/input/stories/Input.stories.tsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Meta, StoryObj } from \"@storybook/react-vite\";\n\nimport { InputNumber, InputText } from \"../Input\";\n\nconst meta = {\n\ttitle: \"Shared/UI/Input\",\n\tcomponent: InputText,\n\targs: {\n\t\tvalue: \"\",\n\t\tonChange: () => {}\n\t},\n\tparameters: {\n\t\tatomicCanvas: true,\n\t\tlayout: \"padded\"\n\t},\n\ttags: [\"autodocs\"],\n\targTypes: {\n\t\tlabel: {\n\t\t\tdescription: \"Заголовок поля.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tdescription: {\n\t\t\tdescription: \"Описание под заголовком.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tplaceholder: {\n\t\t\tdescription: \"Плейсхолдер нативного поля ввода.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tvalue: {\n\t\t\tdescription: \"Текущее значение поля.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tonChange: {\n\t\t\tdescription: \"Вызывается при изменении значения.\",\n\t\t\tcontrol: false\n\t\t},\n\t\tonClear: {\n\t\t\tdescription: \"Callback кнопки очистки справа.\",\n\t\t\tcontrol: false\n\t\t},\n\t\terror: {\n\t\t\tdescription: \"Текст ошибки под полем.\",\n\t\t\tcontrol: \"text\"\n\t\t},\n\t\tonClearError: {\n\t\t\tdescription: \"Вызывается при вводе для сброса внешней ошибки.\",\n\t\t\tcontrol: false\n\t\t},\n\t\tdisabled: {\n\t\t\tdescription: \"Блокирует редактирование.\",\n\t\t\tcontrol: \"boolean\"\n\t\t},\n\t\tsize: {\n\t\t\tdescription: \"Размер поля и подписи.\",\n\t\t\tcontrol: \"select\",\n\t\t\toptions: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"]\n\t\t},\n\t\tallowedPattern: {\n\t\t\tdescription: \"Регулярное выражение для валидации введенной строки.\",\n\t\t\tcontrol: false\n\t\t}\n\t}\n} satisfies Meta<typeof InputText>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const TextControlled: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState(args.value ?? \"\");\n\t\treturn <InputText {...args} value={value} onChange={setValue} onClear={() => setValue(\"\")} />;\n\t},\n\targs: {\n\t\tlabel: \"Наименование\",\n\t\tdescription: \"Пример обычного текстового поля.\",\n\t\tplaceholder: \"Введите значение\",\n\t\tvalue: \"\",\n\t\tsize: \"md\"\n\t}\n};\n\nexport const NumberControlled: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<number>(25);\n\n\t\treturn (\n\t\t\t<InputNumber\n\t\t\t\tlabel=\"Количество\"\n\t\t\t\tdescription=\"Числовой ввод с min/max.\"\n\t\t\t\tplaceholder=\"0\"\n\t\t\t\tvalue={value}\n\t\t\t\tmin={0}\n\t\t\t\tmax={100}\n\t\t\t\tonChange={setValue}\n\t\t\t\tonClear={() => setValue(0)}\n\t\t\t/>\n\t\t);\n\t},\n\targs: {\n\t\tvalue: undefined\n\t}\n};\n\nexport const PatternValidation: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState(\"\");\n\t\treturn (\n\t\t\t<InputText\n\t\t\t\tlabel=\"Только цифры\"\n\t\t\t\tdescription=\"`allowedPattern` подсвечивает невалидный ввод.\"\n\t\t\t\tplaceholder=\"12345\"\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={setValue}\n\t\t\t\tallowedPattern={/^\\d*$/}\n\t\t\t/>\n\t\t);\n\t},\n\targs: {\n\t\tvalue: undefined\n\t}\n};\n\nexport const WithError: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState(\"admin\");\n\t\tconst [error, setError] = useState(\"Логин уже занят\");\n\n\t\treturn (\n\t\t\t<InputText\n\t\t\t\tlabel=\"Логин\"\n\t\t\t\tvalue={value}\n\t\t\t\terror={error}\n\t\t\t\tonChange={setValue}\n\t\t\t\tonClear={() => setValue(\"\")}\n\t\t\t\tonClearError={() => setError(\"\")}\n\t\t\t/>\n\t\t);\n\t},\n\targs: {\n\t\tvalue: undefined\n\t}\n};\n"],"mappings":";;;;AAMA,IAAM,IAAO;CACZ,OAAO;CACP,WAAW;CACX,MAAM;EACL,OAAO;EACP,gBAAgB,CAAC;CAClB;CACA,YAAY;EACX,cAAc;EACd,QAAQ;CACT;CACA,MAAM,CAAC,UAAU;CACjB,UAAU;EACT,OAAO;GACN,aAAa;GACb,SAAS;EACV;EACA,aAAa;GACZ,aAAa;GACb,SAAS;EACV;EACA,aAAa;GACZ,aAAa;GACb,SAAS;EACV;EACA,OAAO;GACN,aAAa;GACb,SAAS;EACV;EACA,UAAU;GACT,aAAa;GACb,SAAS;EACV;EACA,SAAS;GACR,aAAa;GACb,SAAS;EACV;EACA,OAAO;GACN,aAAa;GACb,SAAS;EACV;EACA,cAAc;GACb,aAAa;GACb,SAAS;EACV;EACA,UAAU;GACT,aAAa;GACb,SAAS;EACV;EACA,MAAM;GACL,aAAa;GACb,SAAS;GACT,SAAS;IAAC;IAAM;IAAM;IAAM;IAAM;GAAI;EACvC;EACA,gBAAgB;GACf,aAAa;GACb,SAAS;EACV;CACD;AACD,GAKa,IAAwB;CACpC,SAAS,MAAS;EACjB,IAAM,CAAC,GAAO,KAAY,EAAS,EAAK,SAAS,EAAE;EACnD,OAAO,kBAAC,GAAD;GAAW,GAAI;GAAa;GAAO,UAAU;GAAU,eAAe,EAAS,EAAE;EAAI,CAAA;CAC7F;CACA,MAAM;EACL,OAAO;EACP,aAAa;EACb,aAAa;EACb,OAAO;EACP,MAAM;CACP;AACD,GAEa,IAA0B;CACtC,cAAc;EACb,IAAM,CAAC,GAAO,KAAY,EAAiB,EAAE;EAE7C,OACC,kBAAC,GAAD;GACC,OAAM;GACN,aAAY;GACZ,aAAY;GACL;GACP,KAAK;GACL,KAAK;GACL,UAAU;GACV,eAAe,EAAS,CAAC;EACzB,CAAA;CAEH;CACA,MAAM,EACL,OAAO,KAAA,EACR;AACD,GAEa,IAA2B;CACvC,cAAc;EACb,IAAM,CAAC,GAAO,KAAY,EAAS,EAAE;EACrC,OACC,kBAAC,GAAD;GACC,OAAM;GACN,aAAY;GACZ,aAAY;GACL;GACP,UAAU;GACV,gBAAgB;EAChB,CAAA;CAEH;CACA,MAAM,EACL,OAAO,KAAA,EACR;AACD,GAEa,IAAmB;CAC/B,cAAc;EACb,IAAM,CAAC,GAAO,KAAY,EAAS,OAAO,GACpC,CAAC,GAAO,KAAY,EAAS,iBAAiB;EAEpD,OACC,kBAAC,GAAD;GACC,OAAM;GACC;GACA;GACP,UAAU;GACV,eAAe,EAAS,EAAE;GAC1B,oBAAoB,EAAS,EAAE;EAC/B,CAAA;CAEH;CACA,MAAM,EACL,OAAO,KAAA,EACR;AACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../chunks/InputDateTime-
|
|
1
|
+
import { n as e, r as t, t as n } from "../chunks/InputDateTime-DBkWb0lk.js";
|
|
2
2
|
export { n as InputDate, e as InputDateTime, t as InputTime };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../../chunks/InputDateTime-
|
|
1
|
+
import { n as e, r as t, t as n } from "../../chunks/InputDateTime-DBkWb0lk.js";
|
|
2
2
|
import { useState as r } from "react";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/input-date-time/stories/InputDateTime.stories.tsx
|
package/dist/input-file/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/InputFile-
|
|
1
|
+
import { t as e } from "../chunks/InputFile-Bo3CN73O.js";
|
|
2
2
|
export { e as InputFile };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/InputFiles-
|
|
1
|
+
import { n as e, t } from "../chunks/InputFiles-gIxOPv5y.js";
|
|
2
2
|
export { t as InputFiles, e as InputFilesList };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/InputFiles-
|
|
1
|
+
import { t as e } from "../../chunks/InputFiles-gIxOPv5y.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/input-files/stories/InputFiles.stories.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/InputImage-
|
|
1
|
+
import { t as e } from "../chunks/InputImage-k4l1J_tm.js";
|
|
2
2
|
export { e as InputImage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/InputImage-
|
|
1
|
+
import { t as e } from "../../chunks/InputImage-k4l1J_tm.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/input-image/stories/InputImage.stories.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/input-search-
|
|
1
|
+
import { t as e } from "../chunks/input-search-BR4LDmyb.js";
|
|
2
2
|
export { e as InputSearch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "../chunks/layout-picker-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "../chunks/layout-picker-C1sizRYa.js";
|
|
2
2
|
export { n as DEFAULT_LAYOUT_PICKER_PRESETS, o as LayoutPicker, i as getDefaultLayoutPickerPresetId, r as getLayoutCellStyle, a as getLayoutStyle, t as resolveLayoutCellCount, e as resolveLayoutPreset };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "../../chunks/layout-picker-
|
|
1
|
+
import { n as e, t } from "../../chunks/layout-picker-C1sizRYa.js";
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { fn as a } from "storybook/test";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../chunks/Button-CCWuggdA.js";
|
|
2
|
-
import { t } from "../../chunks/Input-
|
|
2
|
+
import { t } from "../../chunks/Input-BYUl3UFn.js";
|
|
3
3
|
import { a as n, i as r, n as i, r as a, t as o } from "../../chunks/modal-ByNRME3b.js";
|
|
4
4
|
import { useState as s } from "react";
|
|
5
5
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/MultiSelect-
|
|
2
|
-
import { i as n, n as r, r as i, t as a } from "../chunks/multi-select-
|
|
1
|
+
import { n as e, t } from "../chunks/MultiSelect-B0nfMSpS.js";
|
|
2
|
+
import { i as n, n as r, r as i, t as a } from "../chunks/multi-select-DCY3fonG.js";
|
|
3
3
|
export { t as MultiSelect, e as MultiSelectToken, r as ODataDependentMultiSelect, i as ODataDependentSegmentMultiSelect, n as ODataMultiSelect, a as SerializableMultiSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../../chunks/MultiSelect-
|
|
1
|
+
import { t as e } from "../../../chunks/MultiSelect-B0nfMSpS.js";
|
|
2
2
|
import { useMemo as t, useState as n } from "react";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/multi-select/ui/stories/MultiSelect.stories.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Text as e } from "../../text/index.js";
|
|
2
2
|
import { r as t } from "../../chunks/Grid-ByIIytjh.js";
|
|
3
|
-
import { t as n } from "../../chunks/DateInput
|
|
3
|
+
import { t as n } from "../../chunks/DateInput-CaKGXluL.js";
|
|
4
4
|
import { PeriodSelect as r } from "../index.js";
|
|
5
5
|
import { countCalendarDaysInDateRange as i, isDateRangeTuple as a } from "@ryuzaki13/react-foundation-lib/formatters";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
package/dist/picker/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../chunks/picker-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../chunks/picker-DGXq3ikg.js";
|
|
2
2
|
export { r as PickerField, n as PickerPopup, d as PickerStatus, a as PickerTriggerActions, t as PickerTriggerInput, l as createPickerTriggerPolicy, s as extractPickerTextContent, e as usePickerDefaultFilter, i as usePickerFloatingListbox, c as usePickerQuery, o as usePickerSelectionLifecycle, u as usePickerTriggerController };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as e } from "../../chunks/popover-xJJqy1v6.js";
|
|
2
2
|
import { t } from "../../chunks/Button-CCWuggdA.js";
|
|
3
|
-
import { t as n } from "../../chunks/Input-
|
|
3
|
+
import { t as n } from "../../chunks/Input-BYUl3UFn.js";
|
|
4
4
|
import { useState as r } from "react";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
6
|
//#region src/popover/stories/Popover.stories.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Text as e } from "../../../text/index.js";
|
|
2
2
|
import { i as t } from "../../../chunks/Flex-DUYSL5TE.js";
|
|
3
|
-
import { t as n } from "../../../chunks/PresetRangeDateInput-
|
|
3
|
+
import { t as n } from "../../../chunks/PresetRangeDateInput-C5HqkOCG.js";
|
|
4
4
|
import { useState as r } from "react";
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
//#region src/preset-range-date-input/ui/stories/PresetRangeDateInput.stories.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../chunks/Select-
|
|
1
|
+
import { t as e } from "../chunks/Select-B6kxgxK2.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { getPresetOption as n } from "@ryuzaki13/react-foundation-lib/presets";
|
|
4
4
|
//#region src/preset-select/PresetSelect.tsx
|
package/dist/select/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/Select-
|
|
2
|
-
import { t as n } from "../chunks/select-
|
|
3
|
-
import { t as r } from "../chunks/SerializableSelect-
|
|
1
|
+
import { n as e, t } from "../chunks/Select-B6kxgxK2.js";
|
|
2
|
+
import { t as n } from "../chunks/select-Di99RAVO.js";
|
|
3
|
+
import { t as r } from "../chunks/SerializableSelect-CVGFjCGK.js";
|
|
4
4
|
export { n as ODataSelect, t as Select, r as SerializableSelect, e as resolveSelectedOption };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/Select-
|
|
1
|
+
import { t as e } from "../../chunks/Select-B6kxgxK2.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/select/stories/Select.stories.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/SerializableSelect-
|
|
1
|
+
import { t as e } from "../../chunks/SerializableSelect-CVGFjCGK.js";
|
|
2
2
|
import { useMemo as t, useState as n } from "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/select/stories/SerializableSelect.stories.tsx
|
|
@@ -30,13 +30,13 @@ interface SliderInputCommonProps {
|
|
|
30
30
|
*/
|
|
31
31
|
onClearError?: () => void;
|
|
32
32
|
}
|
|
33
|
-
export interface SliderInputProps extends UiBaseProps<number
|
|
33
|
+
export interface SliderInputProps extends UiBaseProps<number>, SliderInputCommonProps {
|
|
34
34
|
/**
|
|
35
35
|
* Marks single-слайдера. Single-компонент отдаёт наружу `mark.value`.
|
|
36
36
|
*/
|
|
37
37
|
marks?: readonly SliderMark[];
|
|
38
38
|
}
|
|
39
|
-
export interface SliderRangeInputProps extends UiBaseProps<SliderRangeValue
|
|
39
|
+
export interface SliderRangeInputProps extends UiBaseProps<SliderRangeValue>, SliderInputCommonProps {
|
|
40
40
|
/**
|
|
41
41
|
* Marks range-слайдера. `value` задаёт координату на шкале, `outputValue` задаёт публичное значение для потребителя.
|
|
42
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderInput.d.ts","sourceRoot":"","sources":["../../src/slider/SliderInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,OAAO,EAKN,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,MAAM,OAAO,CAAC;AAIf,UAAU,sBAAsB;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"SliderInput.d.ts","sourceRoot":"","sources":["../../src/slider/SliderInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,OAAO,EAKN,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,MAAM,OAAO,CAAC;AAIf,UAAU,sBAAsB;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW,CAAC,MAAM,CAAC,EAAE,sBAAsB;IACpF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW,CAAC,gBAAgB,CAAC,EAAE,sBAAsB;IACnG;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACnC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAyGD,wBAAgB,WAAW,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EACJ,KAAK,EACL,aAAuB,EACvB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,EAAE,gBAAgB,+BAkGlB;AAED,wBAAgB,gBAAgB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EACJ,KAAK,EACL,aAAuB,EACvB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,EAAE,qBAAqB,+BA8MvB"}
|
package/dist/slider/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../chunks/slider-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../chunks/slider-BqeYbdrg.js";
|
|
2
2
|
export { n as Slider, r as SliderInput, e as SliderRange, t as SliderRangeInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, r as t } from "../../chunks/slider-
|
|
1
|
+
import { i as e, r as t } from "../../chunks/slider-BqeYbdrg.js";
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
4
|
//#region src/slider/stories/Slider.stories.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "../../chunks/slider-
|
|
1
|
+
import { n as e, t } from "../../chunks/slider-BqeYbdrg.js";
|
|
2
2
|
import { useState as n } from "react";
|
|
3
3
|
import { createFilterBetween as r } from "@ryuzaki13/react-foundation-lib/odata-service";
|
|
4
4
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderInput.stories.js","names":[],"sources":["../../../src/slider/stories/SliderInput.stories.tsx"],"sourcesContent":["import { ReactNode, useState } from \"react\";\n\nimport { createFilterBetween } from \"@ryuzaki13/react-foundation-lib/odata-service\";\n\nimport { SliderInput, SliderRangeInput, type SliderRangeValue } from \"..\";\n\nimport type { Meta, StoryObj } from \"@storybook/react-vite\";\n\nconst percentMarks = [\n\t{ value: 0, label: \"0\" },\n\t{ value: 20, label: \"20\" },\n\t{ value: 40, label: \"40\" },\n\t{ value: 60, label: \"60\" },\n\t{ value: 80, label: \"80\" },\n\t{ value: 100, label: \"100\" }\n] as const;\n\nconst openMonthMarks = [\n\t{ value: 0, label: \"Без нижней границы\", outputValue: null },\n\t{ value: 1, label: \"1 мес.\" },\n\t{ value: 3, label: \"3 мес.\" },\n\t{ value: 6, label: \"6 мес.\" },\n\t{ value: 12, label: \"12 мес.\" },\n\t{ value: 24, label: \"24 мес.\" },\n\t{ value: 25, label: \"Без верхней границы\", outputValue: null }\n] as const;\n\nconst monthToDayMarks = [\n\t{ value: 1, label: \"1 мес.\", outputValue: 30 },\n\t{ value: 3, label: \"3 мес.\", outputValue: 90 },\n\t{ value: 6, label: \"6 мес.\", outputValue: 180 },\n\t{ value: 12, label: \"12 мес.\", outputValue: 360 },\n\t{ value: 24, label: \"24 мес.\", outputValue: 720 }\n] as const;\n\nconst openMonthToDayMarks = [\n\t{ value: 0, label: \"-\", outputValue: null },\n\t{ value: 1, label: \"1м.\", outputValue: 30 },\n\t{ value: 3, label: \"3м.\", outputValue: 90 },\n\t{ value: 6, label: \"6м.\", outputValue: 180 },\n\t{ value: 12, label: \"1г.\", outputValue: 360 },\n\t{ value: 18, label: \"1.5г.\", outputValue: 540 },\n\t{ value: 24, label: \"2г.\", outputValue: 720 },\n\t{ value: 25, label: \"-\", outputValue: null }\n] as const;\n\nconst meta = {\n\ttitle: \"Shared/UI/SliderInput\",\n\tcomponent: SliderInput,\n\targs: {\n\t\tvalue: 12,\n\t\tonChange: () => {},\n\t\tmin: 0,\n\t\tmax: 100,\n\t\tstep: 0.5\n\t},\n\tparameters: {\n\t\tatomicCanvas: true,\n\t\tlayout: \"padded\"\n\t},\n\ttags: [\"autodocs\"]\n} satisfies Meta<typeof SliderInput>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nfunction RangePreview({\n\tvalue,\n\tfield,\n\tchildren\n}: {\n\tvalue: SliderRangeValue | undefined;\n\tfield: string;\n\tunit?: string;\n\tchildren?: ReactNode;\n}) {\n\tconst [from, to] = value ?? [null, null];\n\n\treturn (\n\t\t<div className=\"marginTopMd\">\n\t\t\t<div className=\"textSm сontent2\">Preview фильтра</div>\n\t\t\t<pre>\n\t\t\t\t{JSON.stringify(\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: [from, to],\n\t\t\t\t\t\tfilter: createFilterBetween(field, value)\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t2\n\t\t\t\t)}\n\t\t\t</pre>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport const Basic: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState<number | undefined>(args.value as number | undefined);\n\n\t\treturn (\n\t\t\t<SliderInput\n\t\t\t\t{...args}\n\t\t\t\tlabel=\"Порог\"\n\t\t\t\tdescription=\"Ручной ввод и popover slider работают с одним значением.\"\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={setValue}\n\t\t\t/>\n\t\t);\n\t}\n};\n\nexport const MarksSnap: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState<number | undefined>(40);\n\n\t\treturn <SliderInput {...args} label=\"Готовый пресет\" marks={percentMarks} value={value} onChange={setValue} />;\n\t}\n};\n\nexport const DecimalManualInput: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState<number | undefined>(17.5);\n\n\t\treturn <SliderInput {...args} label=\"Десятичное значение\" value={value} onChange={setValue} />;\n\t},\n\targs: {\n\t\tstep: 0.5\n\t}\n};\n\nexport const RangeInputPlain: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue | undefined>([20, 80]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Процент выполнения\"\n\t\t\t\t\tdescription=\"RangeInput без outputValue: наружу отдаётся координата `value`.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={100}\n\t\t\t\t\tmarks={percentMarks}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"progress\" unit=\"%\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputOpenWithoutExplicitMiddleOutput: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue | undefined>([null, 12]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок в месяцах\"\n\t\t\t\t\tdescription=\"У крайних marks `outputValue:null`; у обычных marks outputValue не указан и берётся `value`.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={25}\n\t\t\t\t\tmarks={openMonthMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"months\" unit=\" мес.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputMonthToDaysOutput: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue | undefined>([90, 360]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок: месяцы на шкале, дни в фильтре\"\n\t\t\t\t\tdescription=\"В поле и фильтре видны дни, а popover показывает месячные marks.\"\n\t\t\t\t\tmin={1}\n\t\t\t\t\tmax={24}\n\t\t\t\t\tmarks={monthToDayMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"days\" unit=\" дн.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputOpenMonthToDaysOutput: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue | undefined>([null, 720]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок: открытые границы и дни в фильтре\"\n\t\t\t\t\tdescription=\"Крайние marks отдают null, обычные marks отдают дни через `outputValue`.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={25}\n\t\t\t\t\tmarks={openMonthToDayMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"days\" unit=\" дн.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputReadonlyText: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue | undefined>([90, 180]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок текстом\"\n\t\t\t\t\tdescription=\"В поле выводится готовый текст по marks, а изменение через popover коммитится при закрытии.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={25}\n\t\t\t\t\tmarks={openMonthToDayMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t\treadonlyValueText\n\t\t\t\t\tplaceholder=\"Любой срок\"\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"days\" unit=\" дн.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const Disabled: Story = {\n\targs: {\n\t\tlabel: \"Недоступно\",\n\t\tdescription: \"Поле и popover отключены.\",\n\t\tvalue: 20,\n\t\tdisabled: true,\n\t\tmarks: percentMarks\n\t}\n};\n"],"mappings":";;;;;AAQA,IAAM,IAAe;CACpB;EAAE,OAAO;EAAG,OAAO;CAAI;CACvB;EAAE,OAAO;EAAI,OAAO;CAAK;CACzB;EAAE,OAAO;EAAI,OAAO;CAAK;CACzB;EAAE,OAAO;EAAI,OAAO;CAAK;CACzB;EAAE,OAAO;EAAI,OAAO;CAAK;CACzB;EAAE,OAAO;EAAK,OAAO;CAAM;AAC5B,GAEM,IAAiB;CACtB;EAAE,OAAO;EAAG,OAAO;EAAsB,aAAa;CAAK;CAC3D;EAAE,OAAO;EAAG,OAAO;CAAS;CAC5B;EAAE,OAAO;EAAG,OAAO;CAAS;CAC5B;EAAE,OAAO;EAAG,OAAO;CAAS;CAC5B;EAAE,OAAO;EAAI,OAAO;CAAU;CAC9B;EAAE,OAAO;EAAI,OAAO;CAAU;CAC9B;EAAE,OAAO;EAAI,OAAO;EAAuB,aAAa;CAAK;AAC9D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AC,IAAI,GAAG,CAAC;CAE1E,OACC,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,GAAD;EACC,OAAM;EACN,aAAY;EACZ,KAAK;EACL,KAAK;EACL,OAAO;EACP,eAAc;EACP;EACP,UAAU;CACV,CAAA,GACD,kBAAC,GAAD;EAAqB;EAAO,OAAM;EAAO,MAAK;CAAQ,CAAA,CACrD,EAAA,CAAA;AAEJ,EACD,GAEa,IAAyC,EACrD,cAAc;CACb,IAAM,CAAC,GAAO,KAAY,EAAuC,CAAC,MAAM,GAAG,CAAC;CAE5E,OACC,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,GAAD;EACC,OAAM;EACN,aAAY;EACZ,KAAK;EACL,KAAK;EACL,OAAO;EACP,eAAc;EACP;EACP,UAAU;CACV,CAAA,GACD,kBAAC,GAAD;EAAqB;EAAO,OAAM;EAAO,MAAK;CAAQ,CAAA,CACrD,EAAA,CAAA;AAEJ,EACD,GAEa,IAAgC,EAC5C,cAAc;CACb,IAAM,CAAC,GAAO,KAAY,EAAuC,CAAC,IAAI,GAAG,CAAC;CAE1E,OACC,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,GAAD;EACC,OAAM;EACN,aAAY;EACZ,KAAK;EACL,KAAK;EACL,OAAO;EACP,eAAc;EACP;EACP,UAAU;EACV,mBAAA;EACA,aAAY;CACZ,CAAA,GACD,kBAAC,GAAD;EAAqB;EAAO,OAAM;EAAO,MAAK;CAAQ,CAAA,CACrD,EAAA,CAAA;AAEJ,EACD,GAEa,IAAkB,EAC9B,MAAM;CACL,OAAO;CACP,aAAa;CACb,OAAO;CACP,UAAU;CACV,OAAO;AACR,EACD"}
|
|
1
|
+
{"version":3,"file":"SliderInput.stories.js","names":[],"sources":["../../../src/slider/stories/SliderInput.stories.tsx"],"sourcesContent":["import { ReactNode, useState } from \"react\";\n\nimport { createFilterBetween } from \"@ryuzaki13/react-foundation-lib/odata-service\";\n\nimport { SliderInput, SliderRangeInput, type SliderRangeValue } from \"..\";\n\nimport type { Meta, StoryObj } from \"@storybook/react-vite\";\n\nconst percentMarks = [\n\t{ value: 0, label: \"0\" },\n\t{ value: 20, label: \"20\" },\n\t{ value: 40, label: \"40\" },\n\t{ value: 60, label: \"60\" },\n\t{ value: 80, label: \"80\" },\n\t{ value: 100, label: \"100\" }\n] as const;\n\nconst openMonthMarks = [\n\t{ value: 0, label: \"Без нижней границы\", outputValue: null },\n\t{ value: 1, label: \"1 мес.\" },\n\t{ value: 3, label: \"3 мес.\" },\n\t{ value: 6, label: \"6 мес.\" },\n\t{ value: 12, label: \"12 мес.\" },\n\t{ value: 24, label: \"24 мес.\" },\n\t{ value: 25, label: \"Без верхней границы\", outputValue: null }\n] as const;\n\nconst monthToDayMarks = [\n\t{ value: 1, label: \"1 мес.\", outputValue: 30 },\n\t{ value: 3, label: \"3 мес.\", outputValue: 90 },\n\t{ value: 6, label: \"6 мес.\", outputValue: 180 },\n\t{ value: 12, label: \"12 мес.\", outputValue: 360 },\n\t{ value: 24, label: \"24 мес.\", outputValue: 720 }\n] as const;\n\nconst openMonthToDayMarks = [\n\t{ value: 0, label: \"-\", outputValue: null },\n\t{ value: 1, label: \"1м.\", outputValue: 30 },\n\t{ value: 3, label: \"3м.\", outputValue: 90 },\n\t{ value: 6, label: \"6м.\", outputValue: 180 },\n\t{ value: 12, label: \"1г.\", outputValue: 360 },\n\t{ value: 18, label: \"1.5г.\", outputValue: 540 },\n\t{ value: 24, label: \"2г.\", outputValue: 720 },\n\t{ value: 25, label: \"-\", outputValue: null }\n] as const;\n\nconst meta = {\n\ttitle: \"Shared/UI/SliderInput\",\n\tcomponent: SliderInput,\n\targs: {\n\t\tvalue: 12,\n\t\tonChange: () => {},\n\t\tmin: 0,\n\t\tmax: 100,\n\t\tstep: 0.5\n\t},\n\tparameters: {\n\t\tatomicCanvas: true,\n\t\tlayout: \"padded\"\n\t},\n\ttags: [\"autodocs\"]\n} satisfies Meta<typeof SliderInput>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nfunction RangePreview({\n\tvalue,\n\tfield,\n\tchildren\n}: {\n\tvalue: SliderRangeValue | undefined;\n\tfield: string;\n\tunit?: string;\n\tchildren?: ReactNode;\n}) {\n\tconst [from, to] = value ?? [null, null];\n\n\treturn (\n\t\t<div className=\"marginTopMd\">\n\t\t\t<div className=\"textSm сontent2\">Preview фильтра</div>\n\t\t\t<pre>\n\t\t\t\t{JSON.stringify(\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: [from, to],\n\t\t\t\t\t\tfilter: createFilterBetween(field, value)\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t2\n\t\t\t\t)}\n\t\t\t</pre>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport const Basic: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState<number>(args.value);\n\n\t\treturn (\n\t\t\t<SliderInput\n\t\t\t\t{...args}\n\t\t\t\tlabel=\"Порог\"\n\t\t\t\tdescription=\"Ручной ввод и popover slider работают с одним значением.\"\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={setValue}\n\t\t\t/>\n\t\t);\n\t}\n};\n\nexport const MarksSnap: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState<number>(40);\n\n\t\treturn <SliderInput {...args} label=\"Готовый пресет\" marks={percentMarks} value={value} onChange={setValue} />;\n\t}\n};\n\nexport const DecimalManualInput: Story = {\n\trender: (args) => {\n\t\tconst [value, setValue] = useState<number>(17.5);\n\n\t\treturn <SliderInput {...args} label=\"Десятичное значение\" value={value} onChange={setValue} />;\n\t},\n\targs: {\n\t\tstep: 0.5\n\t}\n};\n\nexport const RangeInputPlain: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue>([20, 80]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Процент выполнения\"\n\t\t\t\t\tdescription=\"RangeInput без outputValue: наружу отдаётся координата `value`.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={100}\n\t\t\t\t\tmarks={percentMarks}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"progress\" unit=\"%\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputOpenWithoutExplicitMiddleOutput: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue>([null, 12]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок в месяцах\"\n\t\t\t\t\tdescription=\"У крайних marks `outputValue:null`; у обычных marks outputValue не указан и берётся `value`.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={25}\n\t\t\t\t\tmarks={openMonthMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"months\" unit=\" мес.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputMonthToDaysOutput: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue>([90, 360]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок: месяцы на шкале, дни в фильтре\"\n\t\t\t\t\tdescription=\"В поле и фильтре видны дни, а popover показывает месячные marks.\"\n\t\t\t\t\tmin={1}\n\t\t\t\t\tmax={24}\n\t\t\t\t\tmarks={monthToDayMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"days\" unit=\" дн.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputOpenMonthToDaysOutput: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue>([null, 720]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок: открытые границы и дни в фильтре\"\n\t\t\t\t\tdescription=\"Крайние marks отдают null, обычные marks отдают дни через `outputValue`.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={25}\n\t\t\t\t\tmarks={openMonthToDayMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"days\" unit=\" дн.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const RangeInputReadonlyText: Story = {\n\trender: () => {\n\t\tconst [value, setValue] = useState<SliderRangeValue>([90, 180]);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<SliderRangeInput\n\t\t\t\t\tlabel=\"Срок текстом\"\n\t\t\t\t\tdescription=\"В поле выводится готовый текст по marks, а изменение через popover коммитится при закрытии.\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={25}\n\t\t\t\t\tmarks={openMonthToDayMarks}\n\t\t\t\t\tmarksPosition=\"index\"\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={setValue}\n\t\t\t\t\treadonlyValueText\n\t\t\t\t\tplaceholder=\"Любой срок\"\n\t\t\t\t/>\n\t\t\t\t<RangePreview value={value} field=\"days\" unit=\" дн.\" />\n\t\t\t</>\n\t\t);\n\t}\n};\n\nexport const Disabled: Story = {\n\targs: {\n\t\tlabel: \"Недоступно\",\n\t\tdescription: \"Поле и popover отключены.\",\n\t\tvalue: 20,\n\t\tdisabled: true,\n\t\tmarks: percentMarks\n\t}\n};\n"],"mappings":";;;;;AAQA,IAAM,IAAe;CACpB;EAAE,OAAO;EAAG,OAAO;CAAI;CACvB;EAAE,OAAO;EAAI,OAAO;CAAK;CACzB;EAAE,OAAO;EAAI,OAAO;CAAK;CACzB;EAAE,OAAO;EAAI,OAAO;CAAK;C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,kBAAC,GAAD;EAAqB;EAAO,OAAM;EAAO,MAAK;CAAQ,CAAA,CACrD,EAAA,CAAA;AAEJ,EACD,GAEa,IAAkB,EAC9B,MAAM;CACL,OAAO;CACP,aAAa;CACb,OAAO;CACP,UAAU;CACV,OAAO;AACR,EACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/StateSelect-
|
|
1
|
+
import { t as e } from "../chunks/StateSelect-CEp7kGGg.js";
|
|
2
2
|
export { e as StateSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/StateSelect-
|
|
1
|
+
import { t as e } from "../../chunks/StateSelect-CEp7kGGg.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { AlertTriangleIcon as n, CheckCircle2Icon as r, InfoIcon as i, MinusCircleIcon as a, XCircleIcon as o } from "lucide-react";
|
|
4
4
|
import { jsx as s } from "react/jsx-runtime";
|
|
@@ -4,7 +4,7 @@ import { i as n, r } from "../chunks/toolbar-BCZNdRXM.js";
|
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/text-editor/TextEditorLexical.tsx
|
|
6
6
|
function a() {
|
|
7
|
-
return import("../chunks/TextEditorLexicalClient-
|
|
7
|
+
return import("../chunks/TextEditorLexicalClient-uvFboXlh.js").then((e) => ({ TextEditorLexicalClient: e.TextEditorLexicalClient }));
|
|
8
8
|
}
|
|
9
9
|
function o(t) {
|
|
10
10
|
return /* @__PURE__ */ i(e, {
|
package/dist/textarea/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/Textarea-
|
|
1
|
+
import { t as e } from "../chunks/Textarea-T8gXua35.js";
|
|
2
2
|
export { e as Textarea };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i } from "../chunks/odata-DSW7z3nh.js";
|
|
2
|
-
import { t as a } from "../chunks/TreeMultiSelect-
|
|
3
|
-
import { t as o } from "../chunks/TreeSelect-
|
|
2
|
+
import { t as a } from "../chunks/TreeMultiSelect-BcPr2Phe.js";
|
|
3
|
+
import { t as o } from "../chunks/TreeSelect-DYWkgryS.js";
|
|
4
4
|
import { useMemo as s } from "react";
|
|
5
5
|
import { jsx as c } from "react/jsx-runtime";
|
|
6
6
|
//#region src/tree-select/helpers.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/TreeMultiSelect-
|
|
1
|
+
import { t as e } from "../../chunks/TreeMultiSelect-BcPr2Phe.js";
|
|
2
2
|
import { t } from "../../chunks/treeStoryFixtures-Bhm3Gdky.js";
|
|
3
3
|
import { useState as n } from "react";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/TreeSelect-
|
|
1
|
+
import { t as e } from "../../chunks/TreeSelect-DYWkgryS.js";
|
|
2
2
|
import { t } from "../../chunks/treeStoryFixtures-Bhm3Gdky.js";
|
|
3
3
|
import { useState as n } from "react";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|