@patternfly/patternfly-doc-core 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.astro/collections/examples.schema.json +56 -0
- package/.astro/collections/textContent.schema.json +16 -0
- package/.astro/content-modules.mjs +4 -1
- package/.astro/content.d.ts +20 -1
- package/astro.config.mjs +2 -2
- package/declarations.d.ts +2 -0
- package/dist/client/_astro/Button.IBWho7ny.js +9 -0
- package/dist/client/_astro/CSSTable.DHtMmTtQ.js +1185 -0
- package/dist/client/_astro/LiveExample.B7IM_dLQ.css +1 -0
- package/dist/client/_astro/LiveExample.CwKQ5TSc.js +33 -0
- package/dist/client/_astro/Navigation.BSSYIa2f.js +1 -0
- package/dist/client/_astro/PageContext.ipir86Hm.js +1 -0
- package/dist/client/_astro/PageSidebarBody.tzSXGYXP.js +1 -0
- package/dist/client/_astro/PageToggle.C6_rp-Bm.js +1 -0
- package/dist/client/_astro/PageToggleButton.CagcouJB.js +1 -0
- package/dist/client/_astro/SearchInput.BjY-zTwj.js +1 -0
- package/dist/client/_astro/Toolbar.D4TQG77s.js +1 -0
- package/dist/client/_astro/ToolbarContent.DzYW_pmy.js +1 -0
- package/dist/client/_astro/_page_.BWicMEzd.css +1 -0
- package/dist/client/_astro/_page_.Chv_bGyU.css +1 -0
- package/dist/client/_astro/_page_.CtheD08_.css +1 -0
- package/dist/client/_astro/_page_.DxJDkZPc.css +1 -0
- package/dist/client/_astro/client.zs76E0tG.js +1 -0
- package/dist/client/_astro/divider.DTvtnAAt.js +1 -0
- package/dist/client/_astro/help-icon.CDKTE3GW.js +8 -0
- package/dist/client/_astro/index.BQFV5hT1.js +24 -0
- package/dist/client/_astro/index.eCxJ45ll.js +9 -0
- package/dist/client/_astro/page.BTC3Kf3x.js +1 -0
- package/dist/client/components/accordion/index.html +110 -0
- package/dist/client/design-foundations/typography/index.html +35 -8
- package/dist/client/design-foundations/usage-and-behavior/index.html +35 -8
- package/dist/client/get-started/contribute/index.html +35 -8
- package/dist/client/index.html +4 -3
- package/dist/server/_@astrojs-ssr-adapter.mjs +1 -1
- package/dist/server/chunks/Button_DVSwQ8oX.mjs +639 -0
- package/dist/server/chunks/CSSTable_CG80uW98.mjs +740 -0
- package/dist/server/chunks/CSSTable_Dj2CroFz.mjs +4 -0
- package/dist/server/chunks/{PropsTables_MQNZVYdD.mjs → PropsTables_DUo7F9VR.mjs} +169 -246
- package/dist/server/chunks/Stack_Xm3fJVbK.mjs +22 -0
- package/dist/server/chunks/{_@astrojs-ssr-adapter_8jk9s5dg.mjs → _@astrojs-ssr-adapter_CbICuCdt.mjs} +2 -2
- package/dist/server/chunks/{_astro_assets_CmxVRFAY.mjs → _astro_assets_DaYumpRZ.mjs} +2 -2
- package/dist/server/chunks/_astro_data-layer-content_1EAcQtZj.mjs +1 -0
- package/dist/server/chunks/{angle-down-icon_BNJvzYv-.mjs → angle-down-icon_DtGGiMR5.mjs} +150 -832
- package/dist/server/chunks/astro/{server_zRMEhmuT.mjs → server_Cl9jPh4p.mjs} +179 -89
- package/dist/server/chunks/{astro-designed-error-pages_DRBnGamN.mjs → astro-designed-error-pages_BFveJFnQ.mjs} +1 -1
- package/dist/server/chunks/content-modules_BzUEG69n.mjs +1 -0
- package/dist/server/chunks/{sharp_BAxaBZQw.mjs → sharp_CbOL3WDk.mjs} +2 -2
- package/dist/server/entry.mjs +4 -3
- package/dist/server/{manifest_7YAgSoyv.mjs → manifest_Dpwo8Jjv.mjs} +3 -3
- package/dist/server/pages/_image.astro.mjs +1 -1
- package/dist/server/renderers.mjs +63 -14
- package/jest.config.ts +1 -1
- package/package.json +5 -2
- package/src/components/AutoLinkHeader.tsx +56 -0
- package/src/components/CSSSearch.tsx +33 -0
- package/src/components/CSSTable.astro +33 -0
- package/src/components/CSSTable.tsx +268 -0
- package/src/components/Content.tsx +61 -0
- package/src/components/ExampleToolbar.tsx +296 -0
- package/src/components/LiveExample.astro +7 -0
- package/src/components/LiveExample.tsx +42 -0
- package/src/content.config.ts +10 -3
- package/src/content.ts +2 -1
- package/src/layouts/Main.astro +12 -8
- package/src/pages/[section]/[...page].astro +16 -6
- package/src/pages/[section]/[page]/[...tab].astro +107 -40
- package/src/pages/index.astro +0 -1
- package/src/styles/global.scss +47 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/slugger.ts +14 -0
- package/textContent/contribute.md +19 -13
- package/textContent/examples/Accordion/Accordion.mdx +45 -0
- package/textContent/examples/Accordion/AccordionBordered.tsx +141 -0
- package/textContent/examples/Accordion/AccordionDefinitionList.tsx +102 -0
- package/textContent/examples/Accordion/AccordionFixedWithMultipleExpandBehavior.tsx +128 -0
- package/textContent/examples/Accordion/AccordionSingleExpandBehavior.tsx +118 -0
- package/textContent/examples/Accordion/AccordionToggleIconAtStart.tsx +118 -0
- package/dist/client/_astro/Button.C3_jB5tC.js +0 -9
- package/dist/client/_astro/Navigation.CULUlMEB.js +0 -1
- package/dist/client/_astro/PageContext.C7BqCh9N.js +0 -1
- package/dist/client/_astro/PageToggle.DDEjruql.js +0 -1
- package/dist/client/_astro/Toolbar.TAdHxLSQ.js +0 -1
- package/dist/client/_astro/_page_.CXyz_BEo.css +0 -1
- package/dist/client/_astro/_page_.DVvr_Mfl.css +0 -1
- package/dist/client/_astro/_page_.SnUmZn2y.css +0 -1
- package/dist/client/_astro/client.CeeiqVaE.js +0 -1
- package/dist/client/_astro/divider.BSD-oFoh.js +0 -1
- package/dist/client/_astro/index.CTH3fVMn.js +0 -32
- package/dist/client/_astro/page.B65lVdBS.js +0 -1
- /package/dist/server/chunks/{_astro_data-layer-content_DDGBHvtb.mjs → Accordion_CGgMUho2.mjs} +0 -0
- /package/dist/server/chunks/{content-modules_Dz-S_Wwv.mjs → Accordion_DlM2LvlF.mjs} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/examples",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"examples": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"section": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"subsection": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"title": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"propComponents": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"tab": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"cssPrefix": {
|
|
29
|
+
"anyOf": [
|
|
30
|
+
{
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "null"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"$schema": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"id",
|
|
50
|
+
"section"
|
|
51
|
+
],
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
56
|
+
}
|
|
@@ -25,6 +25,22 @@
|
|
|
25
25
|
"tab": {
|
|
26
26
|
"type": "string"
|
|
27
27
|
},
|
|
28
|
+
"cssPrefix": {
|
|
29
|
+
"anyOf": [
|
|
30
|
+
{
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "null"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
28
44
|
"$schema": {
|
|
29
45
|
"type": "string"
|
|
30
46
|
}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export default new Map([
|
|
3
|
+
["textContent/examples/Accordion/Accordion.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=textContent%2Fexamples%2FAccordion%2FAccordion.mdx&astroContentModuleFlag=true")]]);
|
|
4
|
+
|
package/.astro/content.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
declare module 'astro:content' {
|
|
2
|
+
interface Render {
|
|
3
|
+
'.mdx': Promise<{
|
|
4
|
+
Content: import('astro').MarkdownInstance<{}>['Content'];
|
|
5
|
+
headings: import('astro').MarkdownHeading[];
|
|
6
|
+
remarkPluginFrontmatter: Record<string, any>;
|
|
7
|
+
components: import('astro').MDXInstance<{}>['components'];
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
declare module 'astro:content' {
|
|
2
13
|
export interface RenderResult {
|
|
3
14
|
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
|
|
@@ -147,7 +158,15 @@ declare module 'astro:content' {
|
|
|
147
158
|
};
|
|
148
159
|
|
|
149
160
|
type DataEntryMap = {
|
|
150
|
-
"
|
|
161
|
+
"examples": Record<string, {
|
|
162
|
+
id: string;
|
|
163
|
+
body?: string;
|
|
164
|
+
collection: "examples";
|
|
165
|
+
data: InferEntrySchema<"examples">;
|
|
166
|
+
rendered?: RenderedContent;
|
|
167
|
+
filePath?: string;
|
|
168
|
+
}>;
|
|
169
|
+
"textContent": Record<string, {
|
|
151
170
|
id: string;
|
|
152
171
|
body?: string;
|
|
153
172
|
collection: "textContent";
|
package/astro.config.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { defineConfig } from 'astro/config';
|
|
3
3
|
import react from '@astrojs/react';
|
|
4
|
+
import mdx from '@astrojs/mdx';
|
|
4
5
|
|
|
5
6
|
import node from '@astrojs/node';
|
|
6
7
|
|
|
7
8
|
// https://astro.build/config
|
|
8
9
|
export default defineConfig({
|
|
9
|
-
integrations: [react()],
|
|
10
|
-
|
|
10
|
+
integrations: [react(), mdx()],
|
|
11
11
|
vite: {
|
|
12
12
|
ssr: {
|
|
13
13
|
noExternal: ["@patternfly/*", "react-dropzone"],
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as he,r as z}from"./index.eCxJ45ll.js";/* empty css */var A={exports:{}},v={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var J;function xe(){if(J)return v;J=1;var e=he(),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(r,l,u){var c,p={},x=null,m=null;u!==void 0&&(x=""+u),l.key!==void 0&&(x=""+l.key),l.ref!==void 0&&(m=l.ref);for(c in l)t.call(l,c)&&!a.hasOwnProperty(c)&&(p[c]=l[c]);if(r&&r.defaultProps)for(c in l=r.defaultProps,l)p[c]===void 0&&(p[c]=l[c]);return{$$typeof:n,type:r,key:x,ref:m,props:p,_owner:i.current}}return v.Fragment=s,v.jsx=o,v.jsxs=o,v}var K;function ye(){return K||(K=1,A.exports=xe()),A.exports}var f=ye();function $(e,n){var s={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(e);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(s[t[i]]=e[t[i]]);return s}function Xe(e,n,s,t){function i(a){return a instanceof s?a:new s(function(o){o(a)})}return new(s||(s=Promise))(function(a,o){function r(c){try{u(t.next(c))}catch(p){o(p)}}function l(c){try{u(t.throw(c))}catch(p){o(p)}}function u(c){c.done?a(c.value):i(c.value).then(r,l)}u((t=t.apply(e,n||[])).next())})}function h(...e){const n=[],s={}.hasOwnProperty;return e.filter(Boolean).forEach(t=>{const i=typeof t;if(i==="string"||i==="number")n.push(t);else if(Array.isArray(t)&&t.length){const a=h(...t);a&&n.push(a)}else if(i==="object")for(const a in t)s.call(t,a)&&t[a]&&n.push(a)}),n.join(" ")}const ve={value:"36rem"},_e={value:"48rem"},Ie={value:"62rem"},Oe={value:"75rem"},we={value:"90.625rem"},Ce={value:"0rem"},Re={value:"40rem"},je={value:"48rem"},Ee={value:"60rem"},$e={value:"80rem"};let Be=0;function w({name:e,xOffset:n=0,yOffset:s=0,width:t,height:i,svgPath:a}){var o;return o=class extends z.Component{constructor(){super(...arguments),this.id=`icon-title-${Be++}`}render(){const l=this.props,{title:u,className:c}=l,p=$(l,["title","className"]),x=c?`pf-v6-svg ${c}`:"pf-v6-svg",m=!!u,B=[n,s,t,i].join(" ");return f.jsxs("svg",Object.assign({className:x,viewBox:B,fill:"currentColor","aria-labelledby":m?this.id:null,"aria-hidden":m?null:!0,role:"img",width:"1em",height:"1em"},p,{children:[m&&f.jsx("title",{id:this.id,children:u}),f.jsx("path",{d:a})]}))}},o.displayName=e,o}const Le={name:"CheckCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z",yOffset:0,xOffset:0},ke=w(Le),Ne={name:"ExclamationCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0},Ae=w(Ne),Te={name:"ExclamationTriangleIcon",height:512,width:576,svgPath:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0},Pe=w(Te),Se={name:"InfoCircleIcon",height:512,width:512,svgPath:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z",yOffset:0,xOffset:0},De=w(Se),Me={name:"BellIcon",height:1024,width:896,svgPath:"M448,0 C465.333333,0 480.333333,6.33333333 493,19 C505.666667,31.6666667 512,46.6666667 512,64 L512,106 L514.23,106.45 C587.89,121.39 648.48,157.24 696,214 C744,271.333333 768,338.666667 768,416 C768,500 780,568.666667 804,622 C818.666667,652.666667 841.333333,684 872,716 C873.773676,718.829136 875.780658,721.505113 878,724 C890,737.333333 896,752.333333 896,769 C896,785.666667 890,800.333333 878,813 C866,825.666667 850.666667,832 832,832 L63.3,832 C44.9533333,831.84 29.8533333,825.506667 18,813 C6,800.333333 0,785.666667 0,769 C0,752.333333 6,737.333333 18,724 L24,716 L25.06,714.9 C55.1933333,683.28 77.5066667,652.313333 92,622 C116,568.666667 128,500 128,416 C128,338.666667 152,271.333333 200,214 C248,156.666667 309.333333,120.666667 384,106 L384,63.31 C384.166667,46.27 390.5,31.5 403,19 C415.666667,6.33333333 430.666667,0 448,0 Z M576,896 L576,897.08 C575.74,932.6 563.073333,962.573333 538,987 C512.666667,1011.66667 482.666667,1024 448,1024 C413.333333,1024 383.333333,1011.66667 358,987 C332.666667,962.333333 320,932 320,896 L576,896 Z",yOffset:0,xOffset:0},ze=w(Me),R={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"},tt={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"};var V;(function(e){e.success="success",e.error="error",e.warning="warning",e.default="default"})(V||(V={}));const nt={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},_={sm:parseInt(ve.value)*16,md:parseInt(_e.value)*16,lg:parseInt(Ie.value)*16,xl:parseInt(Oe.value)*16,"2xl":parseInt(we.value)*16},I={sm:parseInt(Ce.value)*16,md:parseInt(Re.value)*16,lg:parseInt(je.value)*16,xl:parseInt(Ee.value)*16,"2xl":parseInt($e.value)*16},st={success:ke,danger:Ae,warning:Pe,info:De,custom:ze};function at(e){return e[0].toUpperCase()+e.substring(1)}function rt(e="pf"){const n=new Date().getTime()+Math.random().toString(36).slice(2);return`${e}-${n}`}function it(e,n){let s;return(...t)=>{clearTimeout(s),s=setTimeout(()=>e.apply(this,t),n)}}function lt(e,n,s,t=!1){if(!e||!n)return!1;const i=e.getBoundingClientRect(),a=n.getBoundingClientRect(),o=Math.ceil(i.left),r=Math.floor(i.right),l=Math.ceil(a.left),u=Math.floor(a.right),c=l>=o&&u<=r,p=(s||!t&&i.width<a.width)&&(l<o&&u>o||u>r&&l<r);return c||p}function ot(e,n){const s=e.getBoundingClientRect(),t=n.getBoundingClientRect(),i=Math.floor(s.left),a=Math.floor(s.right),o=Math.floor(t.left),r=Math.floor(t.right),l=o<i,u=r>a;let c=R.NONE;return u&&l?c=R.BOTH:u?c=R.RIGHT:l&&(c=R.LEFT),c}function ct(e,n){return e.replace(/\${(.*?)}/g,(s,t)=>n[t]||"")}function Fe(e,n,s,t,i,a=!1){if(!Array.isArray(i))return;const o=t.filter(u=>u)[0].constructor===Array;let r=e,l=n;s==="up"?e===0?r=i.length-1:r=e-1:s==="down"?e===i.length-1?r=0:r=e+1:s==="left"?n===0?l=t[e].length-1:l=n-1:s==="right"&&(n===t[e].length-1?l=0:l=n+1),t[r]===null||t[r]===void 0||o&&(t[r][l]===null||t[r][l]===void 0)?Fe(r,l,s,t,i,a):a?(t[r].focus&&t[r].focus(),t[r].focus()):s!=="tab"&&(o?t[r][l].focus():t[r].focus())}function ut(e,n){const s=e.current.querySelectorAll(n);return Array.prototype.filter.call(s,function(i){return i.tabIndex>="0"})}function Ue(e,n,s){let t;return n==="up"?e===0?t=s.length-1:t=e-1:e===s.length-1?t=0:t=e+1,s[t]===void 0||s[t][0]===null?Ue(t,n,s):t}function ft(e,n,s){return s||(s=`${n}s`),`${e||0} ${e===1?n:s}`}const dt=(e,n)=>Object.entries(e||{}).reduce((s,[t,i])=>t==="default"?Object.assign(Object.assign({},s),{[n]:i}):Object.assign(Object.assign({},s),{[`${n}-on-${t}`]:i}),{}),pt=(e,n,s="",t,i)=>{if(!e)return"";if(t&&!i){if(t in e)return n.modifiers[T(`${s}${e[t]}`)];const a=["2xl","xl","lg","md","sm","default"],o=a.indexOf(t);for(let r=o;r<a.length;r++)if(a[r]in e)return n.modifiers[T(`${s}${e[a[r]]}`)];return""}return Object.entries(e||{}).map(([a,o])=>`${s}${o}${a!=="default"?`-on-${a}`:""}${i&&a!=="default"?"-height":""}`).map(T).map(a=>a.replace(/-?(\dxl)/gi,(o,r)=>`_${r}`)).map(a=>n.modifiers[a]).filter(Boolean).join(" ")},mt=e=>e===null?null:e>=I["2xl"]?"2xl":e>=I.xl?"xl":e>=I.lg?"lg":e>=I.md?"md":e>=I.sm?"sm":"default",gt=e=>e===null?null:e>=_["2xl"]?"2xl":e>=_.xl?"xl":e>=_.lg?"lg":e>=_.md?"md":e>=_.sm?"sm":"default",He=e=>e.toUpperCase().replace("-","").replace("_",""),T=e=>e.replace(/([-_][a-z])/gi,He),bt=!!(typeof window<"u"&&window.document&&window.document.createElement),Y=(e,n)=>{const s=getComputedStyle(n),t=()=>{let o="";const r={"50%":"ultra-condensed","62.5%":"extra-condensed","75%":"condensed","87.5%":"semi-condensed","100%":"normal","112.5%":"semi-expanded","125%":"expanded","150%":"extra-expanded","200%":"ultra-expanded"};let l;return s.fontStretch in r?l=r[s.fontStretch]:l="normal",o=s.fontStyle+" "+s.fontVariant+" "+s.fontWeight+" "+l+" "+s.fontSize+"/"+s.lineHeight+" "+s.fontFamily,o},a=document.createElement("canvas").getContext("2d");return a.font=s.font||t(),a.measureText(e).width},qe=e=>{const n=getComputedStyle(e);let s=e.clientWidth,t=e.clientHeight;return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),s-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),{height:t,width:s}},ht=(e,n)=>{const s=qe(e).width;let t=n;if(Y(n,e)>s){for(;Y(`...${t}`,e)>s;)t=t.substring(1);e.value?e.value=`...${t}`:e.innerText=`...${t}`}else e.value?e.value=n:e.innerText=n},xt=e=>e.reduce((n,s)=>Object.assign(Object.assign({},n),{[s]:t=>{t.preventDefault()}}),{}),yt=e=>{e.forEach(n=>{n.current&&clearTimeout(n.current)})},vt=(e,n="ltr")=>{if(!e)return n;const s=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(s)?s:n};let We=0;const Z="OUIA-Generated-",P={};function _t(e,n,s=!0){return{"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":s,"data-ouia-component-id":n}}const Ge=(e,n,s=!0,t)=>({"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":s,"data-ouia-component-id":Je(e,n,t)}),Je=(e,n,s)=>{const t=z.useMemo(()=>Ke(e,s),[e,s]);return n??t};function Ke(e,n){try{let s;return typeof window<"u"?s=`${window.location.href}-${e}-${n||""}`:s=`${e}-${n||""}`,P[s]||(P[s]=0),`${Z}${e}-${n?`${n}-`:""}${++P[s]}`}catch{return`${Z}${e}-${n?`${n}-`:""}${++We}`}}const d={button:"pf-v6-c-button",buttonCount:"pf-v6-c-button__count",buttonIcon:"pf-v6-c-button__icon",buttonProgress:"pf-v6-c-button__progress",modifiers:{primary:"pf-m-primary",unread:"pf-m-unread",secondary:"pf-m-secondary",danger:"pf-m-danger",tertiary:"pf-m-tertiary",link:"pf-m-link",inline:"pf-m-inline",displayLg:"pf-m-display-lg",warning:"pf-m-warning",control:"pf-m-control",stateful:"pf-m-stateful",read:"pf-m-read",attention:"pf-m-attention",plain:"pf-m-plain",noPadding:"pf-m-no-padding",block:"pf-m-block",small:"pf-m-small",favorite:"pf-m-favorite",favorited:"pf-m-favorited",clicked:"pf-m-clicked",disabled:"pf-m-disabled",ariaDisabled:"pf-m-aria-disabled",progress:"pf-m-progress",inProgress:"pf-m-in-progress",notify:"pf-m-notify",start:"pf-m-start",end:"pf-m-end"}},j={modifiers:{inline:"pf-m-inline",sm:"pf-m-sm",md:"pf-m-md",lg:"pf-m-lg",xl:"pf-m-xl"},spinner:"pf-v6-c-spinner",spinnerPath:"pf-v6-c-spinner__path"},Ve={name:"--pf-v6-c-spinner--diameter"};var S;(function(e){e.sm="sm",e.md="md",e.lg="lg",e.xl="xl"})(S||(S={}));const Q=e=>{var{className:n="",size:s="xl","aria-valuetext":t="Loading...",diameter:i,isInline:a=!1,"aria-label":o,"aria-labelledBy":r}=e,l=$(e,["className","size","aria-valuetext","diameter","isInline","aria-label","aria-labelledBy"]);return f.jsx("svg",Object.assign({className:h(j.spinner,a?j.modifiers.inline:j.modifiers[s],n),role:"progressbar","aria-valuetext":t,viewBox:"0 0 100 100"},i&&{style:{[Ve.name]:i}},o&&{"aria-label":o},r&&{"aria-labelledBy":r},!o&&!r&&{"aria-label":"Contents"},l,{children:f.jsx("circle",{className:j.spinnerPath,cx:"50",cy:"50",r:"45",fill:"none"})}))};Q.displayName="Spinner";const E={badge:"pf-v6-c-badge",modifiers:{read:"pf-m-read",unread:"pf-m-unread",disabled:"pf-m-disabled"}},X=e=>{var{isRead:n=!1,isDisabled:s=!1,className:t="",children:i="",screenReaderText:a}=e,o=$(e,["isRead","isDisabled","className","children","screenReaderText"]);return f.jsxs("span",Object.assign({},o,{className:h(E.badge,n?E.modifiers.read:E.modifiers.unread,s&&E.modifiers.disabled,t),children:[i,a&&f.jsx("span",{className:"pf-v6-screen-reader",children:a})]}))};X.displayName="Badge";var g;(function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.danger="danger",e.warning="warning",e.link="link",e.plain="plain",e.control="control",e.stateful="stateful"})(g||(g={}));var D;(function(e){e.button="button",e.submit="submit",e.reset="reset"})(D||(D={}));var O;(function(e){e.default="default",e.sm="sm",e.lg="lg"})(O||(O={}));var M;(function(e){e.read="read",e.unread="unread",e.attention="attention"})(M||(M={}));const Ye=e=>{var{children:n=null,className:s="",component:t="button",isClicked:i=!1,isBlock:a=!1,isDisabled:o=!1,isAriaDisabled:r=!1,isLoading:l=null,isDanger:u=!1,spinnerAriaValueText:c,spinnerAriaLabelledBy:p,spinnerAriaLabel:x,size:m=O.default,inoperableEvents:B=["onClick","onKeyPress"],isInline:L=!1,type:te=D.button,variant:b=g.primary,state:ne=M.unread,hasNoPadding:se=!1,iconPosition:F="start","aria-label":ae=null,icon:U=null,role:re,ouiaId:ie,ouiaSafe:le=!0,tabIndex:H=null,innerRef:oe,countOptions:C}=e,ce=$(e,["children","className","component","isClicked","isBlock","isDisabled","isAriaDisabled","isLoading","isDanger","spinnerAriaValueText","spinnerAriaLabelledBy","spinnerAriaLabel","size","inoperableEvents","isInline","type","variant","state","hasNoPadding","iconPosition","aria-label","icon","role","ouiaId","ouiaSafe","tabIndex","innerRef","countOptions"]);const ue=Ge(ee.displayName,ie,le,b),k=t,y=k==="button",N=L&&k==="span",q=F==="end"||F==="right",fe=B.reduce((me,ge)=>Object.assign(Object.assign({},me),{[ge]:be=>{be.preventDefault()}}),{}),de=()=>{if(o)return y?null:-1;if(r)return null;if(N)return 0},W=U&&f.jsx("span",{className:h(d.buttonIcon,n&&d.modifiers[q?"end":"start"]),children:U}),G=n&&f.jsx("span",{className:h("pf-v6-c-button__text"),children:n}),pe=r||!y&&o;return f.jsxs(k,Object.assign({},ce,r?fe:null,pe&&{"aria-disabled":!0},{"aria-label":ae,className:h(d.button,d.modifiers[b],a&&d.modifiers.block,o&&!y&&d.modifiers.disabled,r&&d.modifiers.ariaDisabled,i&&d.modifiers.clicked,L&&b===g.link&&d.modifiers.inline,u&&(b===g.secondary||b===g.link)&&d.modifiers.danger,l!==null&&b!==g.plain&&d.modifiers.progress,l&&d.modifiers.inProgress,se&&b===g.plain&&d.modifiers.noPadding,b===g.stateful&&d.modifiers[ne],m===O.sm&&d.modifiers.small,m===O.lg&&d.modifiers.displayLg,s),disabled:y?o:null,tabIndex:H!==null?H:de(),type:y||N?te:null,role:N?"button":re,ref:oe},ue,{children:[l&&f.jsx("span",{className:h(d.buttonProgress),children:f.jsx(Q,{size:S.md,isInline:L,"aria-valuetext":c,"aria-label":x,"aria-labelledby":p})}),q?f.jsxs(f.Fragment,{children:[G,W]}):f.jsxs(f.Fragment,{children:[W,G]}),C&&f.jsx("span",{className:h(d.buttonCount,C.className),children:f.jsx(X,{isRead:C.isRead,isDisabled:o,children:C.count})})]}))},ee=z.forwardRef((e,n)=>f.jsx(Ye,Object.assign({innerRef:n},e)));ee.displayName="Button";export{Je as $,ft as A,ee as B,ke as C,lt as D,Pe as E,T as F,Ie as G,O as H,De as I,M as J,nt as K,D as L,tt as M,R as N,yt as O,ut as P,Ue as Q,Y as R,Q as S,I as T,qe as U,V,Fe as W,xt as X,ot as Y,ht as Z,$ as _,h as a,we as a0,_e as a1,Ke as b,w as c,it as d,bt as e,at as f,_t as g,ze as h,Ae as i,f as j,g as k,rt as l,pt as m,vt as n,X as o,st as p,S as q,Xe as r,dt as s,ct as t,Ge as u,d as v,_ as w,Oe as x,mt as y,gt as z};
|