@capillarytech/blaze-ui 2.0.2 → 2.0.3
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/README.md +34 -7
- package/dist/CapAlert/CapAlert.d.ts +1 -1
- package/dist/CapAlert/__snapshots__/CapAlert.test.tsx.snap +48 -0
- package/dist/CapAlert/index.js +1 -1
- package/dist/CapAlert/index.js.map +1 -1
- package/dist/CapDivider/CapDivider.d.ts +12 -6
- package/dist/CapDivider/CapDivider.d.ts.map +1 -1
- package/dist/CapDivider/__snapshots__/CapDivider.test.tsx.snap +69 -6
- package/dist/CapDivider/index.js +13 -9
- package/dist/CapDivider/index.js.map +1 -1
- package/dist/CapDropdown/index.js +4 -4
- package/dist/CapDropdown/index.js.map +1 -1
- package/dist/CapInput/Number.d.ts +1 -2
- package/dist/CapInput/Number.d.ts.map +1 -1
- package/dist/CapInput/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +90 -55
- package/dist/index.js.map +1 -1
- package/dist/utils/fonts.d.ts +8 -8
- package/dist/utils/fonts.d.ts.map +1 -1
- package/dist/utils/getCapThemeConfig.d.ts +7 -0
- package/dist/utils/getCapThemeConfig.d.ts.map +1 -1
- package/dist/utils/index.d.ts +10 -10
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +17391 -214
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/styles.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ To customize when the GitHub Action runs:
|
|
|
104
104
|
- Modify the `.github/workflows/gitleaks_secret_scan.yml` file.
|
|
105
105
|
- Adjust the `on` section to trigger scans on additional events or branches.
|
|
106
106
|
|
|
107
|
-
#
|
|
107
|
+
# Cap UI
|
|
108
108
|
|
|
109
109
|
A modern React component library built with Ant Design v6, providing enhanced UI components for Capillary applications.
|
|
110
110
|
|
|
@@ -149,17 +149,44 @@ yarn add @capillarytech/blaze-ui
|
|
|
149
149
|
Load fonts and base styles in your application entry point:
|
|
150
150
|
|
|
151
151
|
```jsx
|
|
152
|
-
import {
|
|
152
|
+
import { loadCapUI } from '@capillarytech/blaze-ui/utils';
|
|
153
153
|
|
|
154
154
|
// Load fonts (Roboto, Material Icons) and base styles (sanitize.css)
|
|
155
|
-
|
|
155
|
+
loadCapUI();
|
|
156
|
+
|
|
157
|
+
// Load with custom base font size (default: '14px')
|
|
158
|
+
loadCapUI({
|
|
159
|
+
baseFontSize: '16px'
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Configuration Options
|
|
164
|
+
|
|
165
|
+
The `loadCapUI` function accepts the following configuration options:
|
|
166
|
+
|
|
167
|
+
| Option | Type | Default | Description |
|
|
168
|
+
|--------|------|---------|-------------|
|
|
169
|
+
| `baseFontSize` | `string` | `'14px'` | Base font size for rem calculations. Sets `document.documentElement.style.fontSize` globally. |
|
|
170
|
+
| `loadRoboto` | `boolean` | `true` | Whether to load the Roboto font family. |
|
|
171
|
+
| `loadMaterialIcons` | `boolean` | `true` | Whether to load Material Icons font. |
|
|
172
|
+
| `robotoWeights` | `number[]` | `[400, 500]` | Array of font weights to load for Roboto (e.g., `[300, 400, 500, 700]`). |
|
|
173
|
+
|
|
174
|
+
**Example with all options:**
|
|
175
|
+
|
|
176
|
+
```jsx
|
|
177
|
+
loadCapUI({
|
|
178
|
+
baseFontSize: '16px',
|
|
179
|
+
loadRoboto: true,
|
|
180
|
+
loadMaterialIcons: true,
|
|
181
|
+
robotoWeights: [300, 400, 500, 700]
|
|
182
|
+
});
|
|
156
183
|
```
|
|
157
184
|
|
|
158
185
|
**Note:** If your app already imports `sanitize.css` directly, webpack will deduplicate it if both resolve to the same module path. To avoid duplication, you can load fonts separately:
|
|
159
186
|
|
|
160
187
|
```jsx
|
|
161
|
-
import {
|
|
162
|
-
|
|
188
|
+
import { loadCapUIFonts } from '@capillarytech/blaze-ui/utils';
|
|
189
|
+
loadCapUIFonts();
|
|
163
190
|
```
|
|
164
191
|
|
|
165
192
|
### Using Components
|
|
@@ -194,7 +221,7 @@ This will start the Storybook development server at `http://localhost:6006`, whe
|
|
|
194
221
|
|
|
195
222
|
## Theming
|
|
196
223
|
|
|
197
|
-
|
|
224
|
+
Cap UI provides a comprehensive theming system using Ant Design v6's token-based architecture. This eliminates the need for SCSS color overrides and provides consistent theming across all components.
|
|
198
225
|
|
|
199
226
|
### Quick Start
|
|
200
227
|
|
|
@@ -221,7 +248,7 @@ The library uses CSS Modules with SCSS and automatically embeds styles in the Ja
|
|
|
221
248
|
|
|
222
249
|
### Using Design Tokens and Variables
|
|
223
250
|
|
|
224
|
-
|
|
251
|
+
Cap UI provides a comprehensive set of design tokens (colors, spacing, typography, etc.) in the `styled` folder that you can use in your application to maintain consistency with the component library.
|
|
225
252
|
|
|
226
253
|
#### For SCSS/SASS Projects
|
|
227
254
|
|
|
@@ -3,7 +3,7 @@ export interface CapAlertProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
type?: 'success' | 'info' | 'warning' | 'error';
|
|
5
5
|
/**
|
|
6
|
-
* Title of the alert
|
|
6
|
+
* Title/message content of the alert. Maps to Ant Design v6's `message` prop internally.
|
|
7
7
|
*/
|
|
8
8
|
title?: React.ReactNode;
|
|
9
9
|
/**
|
|
@@ -192,6 +192,54 @@ exports[`CapAlert Snapshots should match snapshot with success type 1`] = `
|
|
|
192
192
|
</div>
|
|
193
193
|
`;
|
|
194
194
|
|
|
195
|
+
exports[`CapAlert Snapshots should match snapshot with title prop 1`] = `
|
|
196
|
+
<div>
|
|
197
|
+
<div
|
|
198
|
+
class="cap-alert-wrapper"
|
|
199
|
+
>
|
|
200
|
+
<div
|
|
201
|
+
class="ant-alert ant-alert-info ant-alert-no-icon cap-alert-v2 css-var-root css-dev-only-do-not-override-dbp7pc"
|
|
202
|
+
data-show="true"
|
|
203
|
+
role="alert"
|
|
204
|
+
>
|
|
205
|
+
<div
|
|
206
|
+
class="ant-alert-section"
|
|
207
|
+
>
|
|
208
|
+
<div
|
|
209
|
+
class="ant-alert-title"
|
|
210
|
+
>
|
|
211
|
+
Title Alert
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
`;
|
|
218
|
+
|
|
219
|
+
exports[`CapAlert Snapshots should match snapshot with title prop taking precedence over message 1`] = `
|
|
220
|
+
<div>
|
|
221
|
+
<div
|
|
222
|
+
class="cap-alert-wrapper"
|
|
223
|
+
>
|
|
224
|
+
<div
|
|
225
|
+
class="ant-alert ant-alert-info ant-alert-no-icon cap-alert-v2 css-var-root css-dev-only-do-not-override-dbp7pc"
|
|
226
|
+
data-show="true"
|
|
227
|
+
role="alert"
|
|
228
|
+
>
|
|
229
|
+
<div
|
|
230
|
+
class="ant-alert-section"
|
|
231
|
+
>
|
|
232
|
+
<div
|
|
233
|
+
class="ant-alert-title"
|
|
234
|
+
>
|
|
235
|
+
Title
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
`;
|
|
242
|
+
|
|
195
243
|
exports[`CapAlert Snapshots should match snapshot with warning type 1`] = `
|
|
196
244
|
<div>
|
|
197
245
|
<div
|
package/dist/CapAlert/index.js
CHANGED
|
@@ -82,7 +82,7 @@ const CapAlert = _ref => {
|
|
|
82
82
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Alert, _extends({
|
|
83
83
|
className: (0, _classnames.default)(_styles.default[clsPrefix], className),
|
|
84
84
|
type: type,
|
|
85
|
-
|
|
85
|
+
message: alertTitle
|
|
86
86
|
}, rest))
|
|
87
87
|
});
|
|
88
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapAlert/index.js","mappings":";;;;;;;AAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;ACTA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xB7E,oC;;;;;;;;ACAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oDAAoD;AACpD;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wB;;;;;;;;ACrFa;;AAEb,IAAI,IAAqC;AACzC,EAAE,0CAAqE;AACvE,EAAE,KAAK;AAAA,EAEN;;;;;;;;;ACNY;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AACA;AACA;AACA,gD;;;;;;;;ACTa;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;ACnFa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,GAAG,SAAS,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,kGAAC;AACJ,GAAG,KAAK;AAAA,EAEN;AACF,CAAC;;;;;;;;;AC5EY;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;ACjCA,kC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA,mC;;;;;;;;;;;;;ACAA,IAAAe,SAAA,GAAAtC,sBAAA,CAAAF,mBAAA;AAAqCuC,kBAAA,GAAAC,SAAA,CAAA/B,OAAA;AAAA,SAAAP,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA,K","sources":["webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@capillarytech/blaze-ui/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@capillarytech/blaze-ui/./node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack://@capillarytech/blaze-ui/./components/CapAlert/CapAlert.tsx","webpack://@capillarytech/blaze-ui/./components/CapAlert/styles.scss","webpack://@capillarytech/blaze-ui/./components/CapAlert/styles.scss?6be3","webpack://@capillarytech/blaze-ui/external commonjs2 \"antd-v5\"","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/singletonStyleDomAPI.js","webpack://@capillarytech/blaze-ui/./node_modules/react/jsx-runtime.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@capillarytech/blaze-ui/./node_modules/css-loader/dist/runtime/api.js","webpack://@capillarytech/blaze-ui/./node_modules/classnames/index.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@capillarytech/blaze-ui/external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://@capillarytech/blaze-ui/webpack/bootstrap","webpack://@capillarytech/blaze-ui/webpack/runtime/compat get default export","webpack://@capillarytech/blaze-ui/webpack/runtime/define property getters","webpack://@capillarytech/blaze-ui/webpack/runtime/hasOwnProperty shorthand","webpack://@capillarytech/blaze-ui/webpack/runtime/make namespace object","webpack://@capillarytech/blaze-ui/webpack/runtime/nonce","webpack://@capillarytech/blaze-ui/./components/CapAlert/index.ts"],"sourcesContent":["\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","import { Alert } from 'antd-v5';\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport styles from './styles.scss';\n\nconst clsPrefix = 'cap-alert-v2';\n\nexport interface CapAlertProps {\n className?: string;\n type?: 'success' | 'info' | 'warning' | 'error';\n /**\n * Title of the alert (v6 API)\n */\n title?: React.ReactNode;\n /**\n * @deprecated Use `title` instead. Will be removed in next major version.\n */\n message?: React.ReactNode;\n description?: React.ReactNode;\n showIcon?: boolean;\n [key: string]: unknown;\n}\n\nconst CapAlert: React.FC<CapAlertProps> = ({\n className,\n type = 'info',\n title,\n message,\n ...rest\n}) => {\n // Support both new `title` and deprecated `message` props\n const alertTitle = title || message;\n\n return (\n <div className={styles['cap-alert-wrapper']}>\n <Alert\n className={classNames(styles[clsPrefix], className)}\n type={type}\n title={alertTitle}\n {...rest}\n />\n </div>\n );\n};\n\nexport default CapAlert;\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-alert-wrapper .ant-alert{border:none;font-size:.857rem;padding-left:.857rem;padding-right:.857rem}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"cap-alert-wrapper\": `blaze-ui-cap-alert-wrapper`\n};\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/singletonStyleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n \n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.scss\";\n \n \n\nvar options = {};\n\n;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.scss\";\n export default content && content.locals ? content.locals : undefined;\n","module.exports = require(\"antd-v5\");","\"use strict\";\n\n/* istanbul ignore next */\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join(\"\\n\");\n };\n}();\n\n/* istanbul ignore next */\nfunction apply(styleElement, index, remove, obj) {\n var css;\n if (remove) {\n css = \"\";\n } else {\n css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n }\n\n // For old IE\n /* istanbul ignore if */\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = styleElement.childNodes;\n if (childNodes[index]) {\n styleElement.removeChild(childNodes[index]);\n }\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index]);\n } else {\n styleElement.appendChild(cssNode);\n }\n }\n}\nvar singletonData = {\n singleton: null,\n singletonCounter: 0\n};\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") return {\n update: function update() {},\n remove: function remove() {}\n };\n\n // eslint-disable-next-line no-undef,no-use-before-define\n var styleIndex = singletonData.singletonCounter++;\n var styleElement =\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton || (\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton = options.insertStyleElement(options));\n return {\n update: function update(obj) {\n apply(styleElement, styleIndex, false, obj);\n },\n remove: function remove(obj) {\n apply(styleElement, styleIndex, true, obj);\n }\n };\n}\nmodule.exports = domAPI;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","export { default } from './CapAlert';\nexport type { CapAlertProps } from './CapAlert';\n"],"names":["_antdV","require","_classnames","_interopRequireDefault","_react","_styles","_jsxRuntime","_excluded","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutPropertiesLoose","indexOf","clsPrefix","CapAlert","_ref","className","type","title","message","rest","alertTitle","jsx","styles","children","Alert","classNames","_default","exports","_CapAlert"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"CapAlert/index.js","mappings":";;;;;;;AAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,IAAO,6KAA6K;AAC/M,kBAAkB,UA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;AACA,IAAI;AACJ;AACA;AACA,oDAAoD;AACpD;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wB;;;;;;;;ACrFa;;AAEb,IAAI,IAAqC;AACzC,EAAE,0CAAqE;AACvE,EAAE,KAAK;AAAA,EAEN;;;;;;;;;ACNY;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AACA;AACA;AACA,gD;;;;;;;;ACTa;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;ACnFa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,GAAG,SAAS,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,kGAAC;AACJ,GAAG,KAAK;AAAA,EAEN;AACF,CAAC;;;;;;;;;AC5EY;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;ACjCA,kC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA,mC;;;;;;;;;;;;;ACAA,IAAAe,SAAA,GAAAtC,sBAAA,CAAAF,mBAAA;AAAqCuC,kBAAA,GAAAC,SAAA,CAAA/B,OAAA;AAAA,SAAAP,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA,K","sources":["webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@capillarytech/blaze-ui/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@capillarytech/blaze-ui/./node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack://@capillarytech/blaze-ui/./components/CapAlert/CapAlert.tsx","webpack://@capillarytech/blaze-ui/./components/CapAlert/styles.scss","webpack://@capillarytech/blaze-ui/./components/CapAlert/styles.scss?6be3","webpack://@capillarytech/blaze-ui/external commonjs2 \"antd-v5\"","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/singletonStyleDomAPI.js","webpack://@capillarytech/blaze-ui/./node_modules/react/jsx-runtime.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@capillarytech/blaze-ui/./node_modules/css-loader/dist/runtime/api.js","webpack://@capillarytech/blaze-ui/./node_modules/classnames/index.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@capillarytech/blaze-ui/external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://@capillarytech/blaze-ui/webpack/bootstrap","webpack://@capillarytech/blaze-ui/webpack/runtime/compat get default export","webpack://@capillarytech/blaze-ui/webpack/runtime/define property getters","webpack://@capillarytech/blaze-ui/webpack/runtime/hasOwnProperty shorthand","webpack://@capillarytech/blaze-ui/webpack/runtime/make namespace object","webpack://@capillarytech/blaze-ui/webpack/runtime/nonce","webpack://@capillarytech/blaze-ui/./components/CapAlert/index.ts"],"sourcesContent":["\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","import { Alert } from 'antd-v5';\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport styles from './styles.scss';\n\nconst clsPrefix = 'cap-alert-v2';\n\nexport interface CapAlertProps {\n className?: string;\n type?: 'success' | 'info' | 'warning' | 'error';\n /**\n * Title/message content of the alert. Maps to Ant Design v6's `message` prop internally.\n */\n title?: React.ReactNode;\n /**\n * @deprecated Use `title` instead. Will be removed in next major version.\n */\n message?: React.ReactNode;\n description?: React.ReactNode;\n showIcon?: boolean;\n [key: string]: unknown;\n}\n\nconst CapAlert: React.FC<CapAlertProps> = ({\n className,\n type = 'info',\n title,\n message,\n ...rest\n}) => {\n // Support both new `title` and deprecated `message` props\n const alertTitle = title || message;\n\n return (\n <div className={styles['cap-alert-wrapper']}>\n <Alert\n className={classNames(styles[clsPrefix], className)}\n type={type}\n message={alertTitle}\n {...rest}\n />\n </div>\n );\n};\n\nexport default CapAlert;\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-alert-wrapper .ant-alert{border:none;font-size:.857rem;padding-left:.857rem;padding-right:.857rem}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"cap-alert-wrapper\": `blaze-ui-cap-alert-wrapper`\n};\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/singletonStyleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n \n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.scss\";\n \n \n\nvar options = {};\n\n;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.scss\";\n export default content && content.locals ? content.locals : undefined;\n","module.exports = require(\"antd-v5\");","\"use strict\";\n\n/* istanbul ignore next */\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join(\"\\n\");\n };\n}();\n\n/* istanbul ignore next */\nfunction apply(styleElement, index, remove, obj) {\n var css;\n if (remove) {\n css = \"\";\n } else {\n css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n }\n\n // For old IE\n /* istanbul ignore if */\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = styleElement.childNodes;\n if (childNodes[index]) {\n styleElement.removeChild(childNodes[index]);\n }\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index]);\n } else {\n styleElement.appendChild(cssNode);\n }\n }\n}\nvar singletonData = {\n singleton: null,\n singletonCounter: 0\n};\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") return {\n update: function update() {},\n remove: function remove() {}\n };\n\n // eslint-disable-next-line no-undef,no-use-before-define\n var styleIndex = singletonData.singletonCounter++;\n var styleElement =\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton || (\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton = options.insertStyleElement(options));\n return {\n update: function update(obj) {\n apply(styleElement, styleIndex, false, obj);\n },\n remove: function remove(obj) {\n apply(styleElement, styleIndex, true, obj);\n }\n };\n}\nmodule.exports = domAPI;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","export { default } from './CapAlert';\nexport type { CapAlertProps } from './CapAlert';\n"],"names":["_antdV","require","_classnames","_interopRequireDefault","_react","_styles","_jsxRuntime","_excluded","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutPropertiesLoose","indexOf","clsPrefix","CapAlert","_ref","className","type","title","message","rest","alertTitle","jsx","styles","children","Alert","classNames","_default","exports","_CapAlert"],"sourceRoot":""}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import type { DividerProps } from 'antd-v5';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
type
|
|
4
|
-
|
|
3
|
+
type LegacyAlignment = 'left' | 'right';
|
|
4
|
+
type TitlePlacement = 'start' | 'center' | 'end';
|
|
5
|
+
export interface CapDividerProps extends Omit<DividerProps, 'titlePlacement' | 'orientation'> {
|
|
5
6
|
className?: string;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
-
* v6 API: '
|
|
9
|
-
*
|
|
8
|
+
* Text alignment placement for the divider title.
|
|
9
|
+
* v6 API: 'start' | 'center' | 'end' (maps to titlePlacement prop)
|
|
10
|
+
* Legacy values 'left' and 'right' are automatically mapped to 'start' and 'end'
|
|
10
11
|
*/
|
|
11
|
-
orientation?:
|
|
12
|
+
orientation?: LegacyAlignment | TitlePlacement;
|
|
13
|
+
/**
|
|
14
|
+
* Direction of the divider.
|
|
15
|
+
* Maps to Ant Design's orientation prop: 'horizontal' | 'vertical'
|
|
16
|
+
*/
|
|
17
|
+
type?: 'horizontal' | 'vertical';
|
|
12
18
|
}
|
|
13
19
|
declare const CapDivider: React.FC<CapDividerProps>;
|
|
14
20
|
export default CapDivider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapDivider.d.ts","sourceRoot":"","sources":["../../components/CapDivider/CapDivider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,
|
|
1
|
+
{"version":3,"file":"CapDivider.d.ts","sourceRoot":"","sources":["../../components/CapDivider/CapDivider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAExC,KAAK,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAcjD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,aAAa,CAAC;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;IAC/C;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CAClC;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAYzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
+
exports[`CapDivider Snapshots should match snapshot with center orientation 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-center cap-divider-v2"
|
|
7
|
+
role="separator"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="ant-divider-rail ant-divider-rail-start"
|
|
11
|
+
/>
|
|
12
|
+
<span
|
|
13
|
+
class="ant-divider-inner-text"
|
|
14
|
+
>
|
|
15
|
+
Center aligned text
|
|
16
|
+
</span>
|
|
17
|
+
<div
|
|
18
|
+
class="ant-divider-rail ant-divider-rail-end"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`;
|
|
23
|
+
|
|
3
24
|
exports[`CapDivider Snapshots should match snapshot with custom className 1`] = `
|
|
4
25
|
<div>
|
|
5
26
|
<div
|
|
@@ -27,7 +48,28 @@ exports[`CapDivider Snapshots should match snapshot with default props 1`] = `
|
|
|
27
48
|
</div>
|
|
28
49
|
`;
|
|
29
50
|
|
|
30
|
-
exports[`CapDivider Snapshots should match snapshot with
|
|
51
|
+
exports[`CapDivider Snapshots should match snapshot with end orientation 1`] = `
|
|
52
|
+
<div>
|
|
53
|
+
<div
|
|
54
|
+
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-end cap-divider-v2"
|
|
55
|
+
role="separator"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
class="ant-divider-rail ant-divider-rail-start"
|
|
59
|
+
/>
|
|
60
|
+
<span
|
|
61
|
+
class="ant-divider-inner-text"
|
|
62
|
+
>
|
|
63
|
+
End aligned text
|
|
64
|
+
</span>
|
|
65
|
+
<div
|
|
66
|
+
class="ant-divider-rail ant-divider-rail-end"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
exports[`CapDivider Snapshots should match snapshot with horizontal type 1`] = `
|
|
31
73
|
<div>
|
|
32
74
|
<div
|
|
33
75
|
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-rail cap-divider-v2"
|
|
@@ -36,10 +78,10 @@ exports[`CapDivider Snapshots should match snapshot with horizontal orientation
|
|
|
36
78
|
</div>
|
|
37
79
|
`;
|
|
38
80
|
|
|
39
|
-
exports[`CapDivider Snapshots should match snapshot with left orientation 1`] = `
|
|
81
|
+
exports[`CapDivider Snapshots should match snapshot with legacy left orientation (mapped to start) 1`] = `
|
|
40
82
|
<div>
|
|
41
83
|
<div
|
|
42
|
-
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-
|
|
84
|
+
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-start cap-divider-v2"
|
|
43
85
|
role="separator"
|
|
44
86
|
>
|
|
45
87
|
<div
|
|
@@ -57,10 +99,10 @@ exports[`CapDivider Snapshots should match snapshot with left orientation 1`] =
|
|
|
57
99
|
</div>
|
|
58
100
|
`;
|
|
59
101
|
|
|
60
|
-
exports[`CapDivider Snapshots should match snapshot with right orientation 1`] = `
|
|
102
|
+
exports[`CapDivider Snapshots should match snapshot with legacy right orientation (mapped to end) 1`] = `
|
|
61
103
|
<div>
|
|
62
104
|
<div
|
|
63
|
-
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-
|
|
105
|
+
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-end cap-divider-v2"
|
|
64
106
|
role="separator"
|
|
65
107
|
>
|
|
66
108
|
<div
|
|
@@ -78,6 +120,27 @@ exports[`CapDivider Snapshots should match snapshot with right orientation 1`] =
|
|
|
78
120
|
</div>
|
|
79
121
|
`;
|
|
80
122
|
|
|
123
|
+
exports[`CapDivider Snapshots should match snapshot with start orientation 1`] = `
|
|
124
|
+
<div>
|
|
125
|
+
<div
|
|
126
|
+
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-horizontal ant-divider-with-text ant-divider-with-text-start cap-divider-v2"
|
|
127
|
+
role="separator"
|
|
128
|
+
>
|
|
129
|
+
<div
|
|
130
|
+
class="ant-divider-rail ant-divider-rail-start"
|
|
131
|
+
/>
|
|
132
|
+
<span
|
|
133
|
+
class="ant-divider-inner-text"
|
|
134
|
+
>
|
|
135
|
+
Start aligned text
|
|
136
|
+
</span>
|
|
137
|
+
<div
|
|
138
|
+
class="ant-divider-rail ant-divider-rail-end"
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
`;
|
|
143
|
+
|
|
81
144
|
exports[`CapDivider Snapshots should match snapshot with text 1`] = `
|
|
82
145
|
<div>
|
|
83
146
|
<div
|
|
@@ -102,7 +165,7 @@ exports[`CapDivider Snapshots should match snapshot with text 1`] = `
|
|
|
102
165
|
exports[`CapDivider Snapshots should match snapshot with vertical type 1`] = `
|
|
103
166
|
<div>
|
|
104
167
|
<div
|
|
105
|
-
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-
|
|
168
|
+
class="ant-divider css-dev-only-do-not-override-dbp7pc css-var-root ant-divider-vertical ant-divider-rail cap-divider-v2"
|
|
106
169
|
role="separator"
|
|
107
170
|
/>
|
|
108
171
|
</div>
|
package/dist/CapDivider/index.js
CHANGED
|
@@ -40,27 +40,31 @@ var _antdV = __webpack_require__(4273);
|
|
|
40
40
|
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
41
41
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
42
42
|
var _jsxRuntime = __webpack_require__(4848);
|
|
43
|
-
const _excluded = ["className", "orientation"]; //
|
|
43
|
+
const _excluded = ["className", "orientation", "type"]; // Legacy alignment values that need mapping
|
|
44
|
+
// Valid Ant Design v6 title placement values
|
|
44
45
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
45
46
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
46
47
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
47
|
-
// Map
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
if (value === '
|
|
51
|
-
|
|
48
|
+
// Map legacy alignment values to Ant Design v6 titlePlacement values
|
|
49
|
+
const mapTitlePlacement = value => {
|
|
50
|
+
if (value === 'left') return 'start';
|
|
51
|
+
if (value === 'right') return 'end';
|
|
52
|
+
if (value === 'center' || value === 'start' || value === 'end') {
|
|
53
|
+
return value;
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return undefined;
|
|
54
56
|
};
|
|
55
57
|
const CapDivider = _ref => {
|
|
56
58
|
let {
|
|
57
59
|
className,
|
|
58
|
-
orientation
|
|
60
|
+
orientation,
|
|
61
|
+
type = 'horizontal'
|
|
59
62
|
} = _ref,
|
|
60
63
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
61
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Divider, _extends({
|
|
62
65
|
className: (0, _classnames.default)('cap-divider-v2', className),
|
|
63
|
-
orientation:
|
|
66
|
+
orientation: type,
|
|
67
|
+
titlePlacement: mapTitlePlacement(orientation)
|
|
64
68
|
}, rest));
|
|
65
69
|
};
|
|
66
70
|
var _default = exports["default"] = CapDivider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapDivider/index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,IAAO,6KAA6K;AAC/M,kBAAkB,UAAU,eAAe,qBAAqB,6BAA6B,0BAA0B,0DAA0D,4EAA4E,OAAO,wDAAwD,gBAAgB,GAAG,WAAW,GAAG,YAAY;;;;;;;;;ACVzW,oC;;;;;;;;;;;;ACAA,IAAAA,MAAA,GAAAC,mBAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,mBAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,mBAAA;AAA0B,IAAAI,WAAA,GAAAJ,mBAAA;AAAA,MAAAK,SAAA,
|
|
1
|
+
{"version":3,"file":"CapDivider/index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,IAAO,6KAA6K;AAC/M,kBAAkB,UAAU,eAAe,qBAAqB,6BAA6B,0BAA0B,0DAA0D,4EAA4E,OAAO,wDAAwD,gBAAgB,GAAG,WAAW,GAAG,YAAY;;;;;;;;;ACVzW,oC;;;;;;;;;;;;ACAA,IAAAA,MAAA,GAAAC,mBAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,mBAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,mBAAA;AAA0B,IAAAI,WAAA,GAAAJ,mBAAA;AAAA,MAAAK,SAAA,yCAE1B;AAEA;AAAA,SAAAH,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,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N,SAAS,CAAE;IACnDC,WAAW,EAAEC,IAAK;IAClBK,cAAc,EAAEZ,iBAAiB,CAACM,WAAW;EAAE,GAC3CE,IAAI,CACT,CAAC;AAAA,CACH;AAAC,IAAAK,QAAA,GAAAC,kBAAA,GAEaX,UAAU,C;;;;;;;;ACnDZ;;AAEb,IAAI,IAAqC;AACzC,EAAE,0CAAqE;AACvE,EAAE,KAAK;AAAA,EAEN;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,GAAG,SAAS,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,kGAAC;AACJ,GAAG,KAAK;AAAA,EAEN;AACF,CAAC;;;;;;;;;AC5ED,kC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,IAAAY,WAAA,GAAApC,sBAAA,CAAAF,mBAAA;AAAuCqC,kBAAA,GAAAC,WAAA,CAAA9B,OAAA;AAAA,SAAAN,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA,K","sources":["webpack://@capillarytech/blaze-ui/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@capillarytech/blaze-ui/external commonjs2 \"antd-v5\"","webpack://@capillarytech/blaze-ui/./components/CapDivider/CapDivider.tsx","webpack://@capillarytech/blaze-ui/./node_modules/react/jsx-runtime.js","webpack://@capillarytech/blaze-ui/./node_modules/classnames/index.js","webpack://@capillarytech/blaze-ui/external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://@capillarytech/blaze-ui/webpack/bootstrap","webpack://@capillarytech/blaze-ui/./components/CapDivider/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = require(\"antd-v5\");","import { Divider } from 'antd-v5';\nimport type { DividerProps } from 'antd-v5';\nimport classNames from 'classnames';\nimport React from 'react';\n\n// Legacy alignment values that need mapping\ntype LegacyAlignment = 'left' | 'right';\n// Valid Ant Design v6 title placement values\ntype TitlePlacement = 'start' | 'center' | 'end';\n\n// Map legacy alignment values to Ant Design v6 titlePlacement values\nconst mapTitlePlacement = (\n value: LegacyAlignment | TitlePlacement | undefined\n): DividerProps['titlePlacement'] => {\n if (value === 'left') return 'start';\n if (value === 'right') return 'end';\n if (value === 'center' || value === 'start' || value === 'end') {\n return value;\n }\n return undefined;\n};\n\nexport interface CapDividerProps extends Omit<DividerProps, 'titlePlacement' | 'orientation'> {\n className?: string;\n /**\n * Text alignment placement for the divider title.\n * v6 API: 'start' | 'center' | 'end' (maps to titlePlacement prop)\n * Legacy values 'left' and 'right' are automatically mapped to 'start' and 'end'\n */\n orientation?: LegacyAlignment | TitlePlacement;\n /**\n * Direction of the divider.\n * Maps to Ant Design's orientation prop: 'horizontal' | 'vertical'\n */\n type?: 'horizontal' | 'vertical';\n}\n\nconst CapDivider: React.FC<CapDividerProps> = ({\n className,\n orientation,\n type = 'horizontal',\n ...rest\n}) => (\n <Divider\n className={classNames('cap-divider-v2', className)}\n orientation={type}\n titlePlacement={mapTitlePlacement(orientation)}\n {...rest}\n />\n);\n\nexport default CapDivider;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","export { default } from './CapDivider';\nexport type { CapDividerProps } from './CapDivider';\n"],"names":["_antdV","require","_classnames","_interopRequireDefault","_react","_jsxRuntime","_excluded","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutPropertiesLoose","indexOf","mapTitlePlacement","value","undefined","CapDivider","_ref","className","orientation","type","rest","jsx","Divider","classNames","titlePlacement","_default","exports","_CapDivider"],"sourceRoot":""}
|
|
@@ -44,9 +44,9 @@ const CapDropdownComponent = _ref => {
|
|
|
44
44
|
const v6Placement = mapPlacement(placement);
|
|
45
45
|
|
|
46
46
|
// Support both new `classNames.root` and deprecated `overlayClassName` props
|
|
47
|
-
|
|
48
|
-
const finalClassNames = _extends({}, classNamesProp, {
|
|
49
|
-
root: (0, _classnames.default)(_styles.default[clsPrefix + "-overlay"],
|
|
47
|
+
const existingRoot = classNamesProp && typeof classNamesProp === 'object' && !Array.isArray(classNamesProp) ? classNamesProp.root : undefined;
|
|
48
|
+
const finalClassNames = _extends({}, typeof classNamesProp === 'object' && !Array.isArray(classNamesProp) ? classNamesProp : {}, {
|
|
49
|
+
root: (0, _classnames.default)(_styles.default[clsPrefix + "-overlay"], existingRoot, overlayClassName)
|
|
50
50
|
});
|
|
51
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Dropdown, _extends({
|
|
52
52
|
className: (0, _classnames.default)(_styles.default[clsPrefix], className),
|
|
@@ -158,7 +158,7 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
|
|
|
158
158
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
|
|
159
159
|
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
|
|
160
160
|
// Module
|
|
161
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-dropdown-v2-overlay{min-width:14.286rem}.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{padding:.857rem 1.714rem}`, ""]);
|
|
161
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-dropdown-v2-overlay{min-width:14.286rem}.blaze-ui-cap-dropdown-v2-overlay .ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{padding:.857rem 1.714rem}`, ""]);
|
|
162
162
|
// Exports
|
|
163
163
|
___CSS_LOADER_EXPORT___.locals = {
|
|
164
164
|
"cap-dropdown-v2-overlay": `blaze-ui-cap-dropdown-v2-overlay`
|